Bug 275719 - [new port] archivers/py-zlib-ng: Python bindings for the zlib-ng library
Summary: [new port] archivers/py-zlib-ng: Python bindings for the zlib-ng library
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Koichiro Iwao
URL: https://pypi.org/project/zlib-ng/
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-12 10:40 UTC by Oleg Sidorkin
Modified: 2024-01-09 20:41 UTC (History)
2 users (show)

See Also:


Attachments
patch for new port archivers/py-zlib-ng 0.2.0 (via git am) (2.70 KB, patch)
2023-12-12 10:40 UTC, Oleg Sidorkin
no flags Details | Diff
patch for new port archivers/py-zlib-ng 0.4.0 (via git am) (3.66 KB, patch)
2024-01-05 19:14 UTC, Oleg Sidorkin
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oleg Sidorkin 2023-12-12 10:40:57 UTC
Created attachment 247003 [details]
patch for new port archivers/py-zlib-ng 0.2.0 (via git am)

This library is required by homeassistant.

Release requires upstream patch to be built on freebsd, so I decided to make a port.

I'm using static linking of vendored zlib-ng here because our archivers/zlib-ng port is quite old and it's not trivial to update it due to #difine that breaks libc compilation.
Comment 1 Oleg Sidorkin 2024-01-05 19:14:10 UTC
Created attachment 247470 [details]
patch for new port archivers/py-zlib-ng 0.4.0 (via git am)

New version 0.4.0 released
Comment 2 Jon Moore 2024-01-08 14:50:23 UTC
Hi,

I'm also using homeassistant and would really like to get this working. Is there an easy way to install this so that my venv can see it?

Thanks so much for the work on creating this!

Cheers,
Jon
Comment 3 Oleg Sidorkin 2024-01-08 15:49:04 UTC
(In reply to Jon Moore from comment #2)

My venv sees site packages because of include-system-site-packages = true entry in the config.

Actually, 0.4.0 could be successfully installed via pip.

I'm still thinking about updating zlib-ng port and using shared library from it, so this port still has some value.
Comment 4 Jon Moore 2024-01-08 16:48:04 UTC
ah, I'm getting errors about pip not being able to build wheel for zlib-ng. But I'm on truenas so may be different your environment?
pip won't install outside the venv either so if you've got a package that could install with pkg that would be ideal. 
Is this on a different repository? I can't find it with pkg
Comment 5 Oleg Sidorkin 2024-01-08 18:01:51 UTC
(In reply to Jon Moore from comment #4)

It depends on homeassistant version. The last one (2024.1.2) has zlib-ng >=0.3.0 dependency.

I'm using FreeBSD stable/14 and 0.4.0 was pulled by pip and installed (before I noticed and updated the patch) :)

This port is not commited yet, so there is no package.

I'm building my packages on my own with poudriere. My HA instance is in its own jail, so having local package repository is quite convenient.
Comment 6 Jon Moore 2024-01-08 20:24:11 UTC
(In reply to Oleg Sidorkin from comment #5)
I'm also working in a jail.

But unless I can figure out how to get this to build then I guess I'm going to be stuck on the old version of home assistant.

Oh well, thank you for trying. I'll keep playing and see if I can build python-zlib-ng from source outside the venv then change the venv config to make the system packages available.
Comment 7 commit-hook freebsd_committer freebsd_triage 2024-01-09 00:48:24 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=4e26a09cbb6c06055f055fec19d70e2dbd0838e8

commit 4e26a09cbb6c06055f055fec19d70e2dbd0838e8
Author:     Oleg Sidorkin <osidorkin@gmail.com>
AuthorDate: 2023-12-11 15:57:18 +0000
Commit:     Koichiro Iwao <meta@FreeBSD.org>
CommitDate: 2024-01-09 00:45:44 +0000

    archivers/py-zlib-ng: Add new port

    PR:             275719

 archivers/Makefile                                 |  1 +
 archivers/py-zlib-ng/Makefile (new)                | 23 ++++++++++++++++++++++
 archivers/py-zlib-ng/distinfo (new)                |  3 +++
 ...patch-src_zlib__ng_zlib-ng_CMakeLists.txt (new) | 15 ++++++++++++++
 archivers/py-zlib-ng/pkg-descr (new)               |  2 ++
 5 files changed, 44 insertions(+)
Comment 8 Koichiro Iwao freebsd_committer freebsd_triage 2024-01-09 00:49:14 UTC
Committed, thanks!
Comment 9 Jon Moore 2024-01-09 17:06:30 UTC
amazing! thanks!

Are you running your HA in venv on python3.9? I'm on python3.11 for venv and wondering if it would be able to access this now it's installed?

Sorry this probably isn't the right place to ask, but I was stumped
Comment 10 Oleg Sidorkin 2024-01-09 20:41:00 UTC
(In reply to Jon Moore from comment #9)

My HA instance is on python 3.11