From 923af4dd20f562bd0e6b703559d141591e3f5944dc95b9a8124736450bbee50d Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Tue, 19 Nov 2024 11:53:44 +0000 Subject: [PATCH 1/2] - builda gainst modern python on sle15 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-zlib-ng?expand=0&rev=6 --- .gitattributes | 23 ++++++++++ .gitignore | 1 + _multibuild | 3 ++ concatenated.fastq.gz | 3 ++ python-zlib-ng.changes | 48 ++++++++++++++++++++ python-zlib-ng.spec | 91 +++++++++++++++++++++++++++++++++++++ seeds.txt | 100 +++++++++++++++++++++++++++++++++++++++++ test.fastq.bgzip.gz | 3 ++ test.fastq.gz | 3 ++ zlib-ng-0.4.1.tar.gz | 3 ++ 10 files changed, 278 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _multibuild create mode 100644 concatenated.fastq.gz create mode 100644 python-zlib-ng.changes create mode 100644 python-zlib-ng.spec create mode 100644 seeds.txt create mode 100644 test.fastq.bgzip.gz create mode 100644 test.fastq.gz create mode 100644 zlib-ng-0.4.1.tar.gz diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..49fb912 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/concatenated.fastq.gz b/concatenated.fastq.gz new file mode 100644 index 0000000..2ff8b89 --- /dev/null +++ b/concatenated.fastq.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:cb22726d477bafe5b6f8bab6a48e160944580e6697efe805513ba8a33b372747 +size 92680 diff --git a/python-zlib-ng.changes b/python-zlib-ng.changes new file mode 100644 index 0000000..07c50a0 --- /dev/null +++ b/python-zlib-ng.changes @@ -0,0 +1,48 @@ +------------------------------------------------------------------- +Tue Nov 19 11:53:31 UTC 2024 - Dirk Müller + +- builda gainst modern python on sle15 + +------------------------------------------------------------------- +Sat Mar 16 14:42:27 UTC 2024 - Dirk Müller + +- update to 0.4.1: + * Fix a bug where streams that were passed to + gzip_ng_threaded.open where closed. + * Fix compatibility with Python 3.13 + +------------------------------------------------------------------- +Tue Feb 6 20:48:05 UTC 2024 - Ben Greiner + +- Update to 0.4.0 + * Add a gzip_ng_threaded module that contains the + gzip_ng_threaded.open function. This allows using multithreaded + compression as well as escaping the GIL. + * The internal gzip_ng._GzipReader has been rewritten in C. As a + result the overhead of decompressing files has significantly + been reduced. + * The gzip_ng._GzipReader in C is now used in gzip_ng.decompress. + The _GzipReader also can read from objects that support the + buffer protocol. This has reduced overhead significantly. + * Fix some unclosed buffer errors in the gzip_ng CLI. +- Version 0.3.0 + * Source distributions on Linux now default to building with + configure and make as it is faster and has less dependencies + than CMake. + * Python 3.12 support was added. Python 3.7 support was dropped + as it is end of life. + * Update embedded zlib-ng version to 2.1.5. This comes with some + speed improvements and changes with regards to the compression + levels. Also several bugs were fixed. For full details checkout + the zlib-ng 2.1.2 release notes as well as those for the bugfix + releases 2.1.3, 2.1.4 and 2.1.5. +- Fix BuildRequirements. This one never used poetry. +- Enable tests in multibuild: some tests call python3.X -m zlib_ng + without respecting the PYTHONPATH from %pytest_arch. +- Link to system library + +------------------------------------------------------------------- +Wed Dec 6 10:25:00 UTC 2023 - Adrian Schröter + +- initial package of version 0.2.0 + diff --git a/python-zlib-ng.spec b/python-zlib-ng.spec new file mode 100644 index 0000000..77c00cc --- /dev/null +++ b/python-zlib-ng.spec @@ -0,0 +1,91 @@ +# +# spec file for package python-zlib-ng +# +# Copyright (c) 2024 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + + +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif + +%{?sle15_python_module_pythons} +Name: python-zlib-ng%{psuffix} +Version: 0.4.1 +Release: 0 +License: Python-2.0 +Summary: Faster zlib and gzip compatible compression and decompression +Group: Development/Languages/Python +URL: https://github.com/pycompression/python-zlib-ng +Source0: https://files.pythonhosted.org/packages/source/z/zlib-ng/zlib-ng-%{version}.tar.gz +Source1: https://github.com/pycompression/python-zlib-ng/raw/v%{version}/tests/data/concatenated.fastq.gz +Source2: https://github.com/pycompression/python-zlib-ng/raw/v%{version}/tests/data/seeds.txt +Source3: https://github.com/pycompression/python-zlib-ng/raw/v%{version}/tests/data/test.fastq.bgzip.gz +Source4: https://github.com/pycompression/python-zlib-ng/raw/v%{version}/tests/data/test.fastq.gz +BuildRequires: %{python_module devel >= 3.8} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildRequires: zlib-ng-devel +Provides: python-zlib_ng = %{version}-%{release} +%if %{with test} +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module testsuite} +BuildRequires: %{python_module zlib-ng = %{version}} +%endif +%python_subpackages + +%description +Faster zlib and gzip compatible compression and decompression by providing Python bindings for the zlib-ng library. + +This package provides Python bindings for the zlib-ng library. + +%prep +%setup -q -n zlib-ng-%{version} +mkdir tests/data +cp %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} tests/data/ + +%build +%if !%{with test} +export PYTHON_ZLIB_NG_LINK_DYNAMIC=1 +%pyproject_wheel +%endif + +%install +%if !%{with test} +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitearch} +%endif + +%if %{with test} +%check +%pytest_arch +%endif + +%if !%{with test} +%files %{python_files} +%license LICENSE +%doc README.rst +%{python_sitearch}/zlib_ng +%{python_sitearch}/zlib_ng-%{version}.dist-info +%endif + +%changelog diff --git a/seeds.txt b/seeds.txt new file mode 100644 index 0000000..0df5318 --- /dev/null +++ b/seeds.txt @@ -0,0 +1,100 @@ +3543943125 +2012239574 +2871899840 +1576915383 +443567851 +3239180423 +3373382826 +3275169686 +3720569364 +2789290573 +618407468 +3601134391 +257166085 +951339096 +688447921 +2980268332 +4041231849 +2665838137 +2152080166 +3061402473 +114075645 +1066757169 +3059147274 +246562262 +3880192386 +4271112646 +3614603334 +3491130170 +332943583 +1921692081 +159629030 +4169931400 +641090334 +2429776133 +152825723 +2237958331 +2779470898 +872209389 +1543398313 +227922013 +1433480097 +2411689409 +4285411687 +2669236754 +2315690542 +2593947855 +2435538281 +640615264 +2183831503 +2141774460 +498759490 +1981068107 +659087394 +644660319 +4084740067 +306553019 +4172422758 +761521931 +2820900477 +160799031 +3875345091 +1347385004 +2312301814 +404607200 +2258507054 +1861096434 +3113292015 +1063461481 +3623153239 +11376533 +1748307784 +1185247326 +1030491484 +3925346575 +4212727269 +4234599042 +4019013354 +3237401702 +1335471143 +3405720069 +4119823939 +1476030215 +1339973082 +3541240200 +608243180 +4149852723 +3655893277 +2099999624 +3547173299 +860208608 +4254465956 +603882225 +1785239865 +3260029982 +83829029 +3136481952 +2052207849 +1971968310 +2157083216 +3415051802 diff --git a/test.fastq.bgzip.gz b/test.fastq.bgzip.gz new file mode 100644 index 0000000..24d949d --- /dev/null +++ b/test.fastq.bgzip.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:95c770e328b56169ab48a3f1681dca55719924409b2e3d3b24a6e74d8bce6d5b +size 1556539 diff --git a/test.fastq.gz b/test.fastq.gz new file mode 100644 index 0000000..233d5db --- /dev/null +++ b/test.fastq.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:110fd6cd976092bb0fee2a828c9aeb7a03224c4428a1438b02a6b590e4759a68 +size 1660692 diff --git a/zlib-ng-0.4.1.tar.gz b/zlib-ng-0.4.1.tar.gz new file mode 100644 index 0000000..6183172 --- /dev/null +++ b/zlib-ng-0.4.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:153183724143711c92bd243528b97fdd3b2426c778079498b882fce445a68421 +size 2459224 From 0275f3ae54c3d40f0999b4943f61a32262c267c5aed89805e054d06b962455bc Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Fri, 22 Nov 2024 17:43:34 +0000 Subject: [PATCH 2/2] - update to 0.5.1: * Fix a bug where flushing in threaded mode did not write the data to the output file. * Threaded reading and writing do no longer block exiting when an exception occurs in the main thread. - update to 0.5.0: * Fix a bug where READ and WRITE in zlib_ng.gzip_ng were inconsistent with the values in gzip on Python 3.13 * Small simplifications to the ``gzip_ng.compress`` and ``gzip_ng.decompress`` functions, which should lead to less overhead. - update to 0.4.3: * Fix a bug where files larger than 4GB could not be decompressed. - update to 0.4.2: * Fix a reference counting error that happened on module initialization and triggered an error in the CPython debug build. * Fix a setup.py error that was triggered on MacOS ARM64. - build against modern python on sle15 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-zlib-ng?expand=0&rev=7 --- concatenated.fastq.gz | 3 -- python-zlib-ng.changes | 25 +++++++++- python-zlib-ng.spec | 14 ++---- seeds.txt | 100 ---------------------------------------- test.fastq.bgzip.gz | 3 -- test.fastq.gz | 3 -- zlib-ng-0.4.1.tar.gz | 3 -- zlib-ng-0.5.1-gh.tar.gz | 3 ++ zlib_ng-0.5.1.tar.gz | 3 ++ 9 files changed, 35 insertions(+), 122 deletions(-) delete mode 100644 concatenated.fastq.gz delete mode 100644 seeds.txt delete mode 100644 test.fastq.bgzip.gz delete mode 100644 test.fastq.gz delete mode 100644 zlib-ng-0.4.1.tar.gz create mode 100644 zlib-ng-0.5.1-gh.tar.gz create mode 100644 zlib_ng-0.5.1.tar.gz diff --git a/concatenated.fastq.gz b/concatenated.fastq.gz deleted file mode 100644 index 2ff8b89..0000000 --- a/concatenated.fastq.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cb22726d477bafe5b6f8bab6a48e160944580e6697efe805513ba8a33b372747 -size 92680 diff --git a/python-zlib-ng.changes b/python-zlib-ng.changes index 07c50a0..3b8de9e 100644 --- a/python-zlib-ng.changes +++ b/python-zlib-ng.changes @@ -1,7 +1,30 @@ +------------------------------------------------------------------- +Fri Nov 22 17:33:04 UTC 2024 - Dirk Müller + +- update to 0.5.1: + * Fix a bug where flushing in threaded mode did not write the + data to the output file. + * Threaded reading and writing do no longer block exiting + when an exception occurs in the main thread. +- update to 0.5.0: + * Fix a bug where READ and WRITE in zlib_ng.gzip_ng were + inconsistent with the values in gzip on Python 3.13 + * Small simplifications to the ``gzip_ng.compress`` and + ``gzip_ng.decompress`` functions, which should lead to less + overhead. +- update to 0.4.3: + * Fix a bug where files larger than 4GB could not be + decompressed. +- update to 0.4.2: + * Fix a reference counting error that happened on module + initialization and triggered an error in the CPython debug + build. + * Fix a setup.py error that was triggered on MacOS ARM64. + ------------------------------------------------------------------- Tue Nov 19 11:53:31 UTC 2024 - Dirk Müller -- builda gainst modern python on sle15 +- build against modern python on sle15 ------------------------------------------------------------------- Sat Mar 16 14:42:27 UTC 2024 - Dirk Müller diff --git a/python-zlib-ng.spec b/python-zlib-ng.spec index 77c00cc..04f43b2 100644 --- a/python-zlib-ng.spec +++ b/python-zlib-ng.spec @@ -27,20 +27,18 @@ %{?sle15_python_module_pythons} Name: python-zlib-ng%{psuffix} -Version: 0.4.1 +Version: 0.5.1 Release: 0 License: Python-2.0 Summary: Faster zlib and gzip compatible compression and decompression Group: Development/Languages/Python URL: https://github.com/pycompression/python-zlib-ng -Source0: https://files.pythonhosted.org/packages/source/z/zlib-ng/zlib-ng-%{version}.tar.gz -Source1: https://github.com/pycompression/python-zlib-ng/raw/v%{version}/tests/data/concatenated.fastq.gz -Source2: https://github.com/pycompression/python-zlib-ng/raw/v%{version}/tests/data/seeds.txt -Source3: https://github.com/pycompression/python-zlib-ng/raw/v%{version}/tests/data/test.fastq.bgzip.gz -Source4: https://github.com/pycompression/python-zlib-ng/raw/v%{version}/tests/data/test.fastq.gz +Source0: https://files.pythonhosted.org/packages/source/z/zlib-ng/zlib_ng-%{version}.tar.gz +Source1: https://github.com/pycompression/python-zlib-ng/archive/refs/tags/v%{version}.tar.gz#/zlib-ng-%{version}-gh.tar.gz BuildRequires: %{python_module devel >= 3.8} BuildRequires: %{python_module pip} BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module versioningit} BuildRequires: %{python_module wheel} BuildRequires: fdupes BuildRequires: python-rpm-macros @@ -59,9 +57,7 @@ Faster zlib and gzip compatible compression and decompression by providing Pytho This package provides Python bindings for the zlib-ng library. %prep -%setup -q -n zlib-ng-%{version} -mkdir tests/data -cp %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} tests/data/ +%setup -q -a1 -n zlib_ng-%{version} %build %if !%{with test} diff --git a/seeds.txt b/seeds.txt deleted file mode 100644 index 0df5318..0000000 --- a/seeds.txt +++ /dev/null @@ -1,100 +0,0 @@ -3543943125 -2012239574 -2871899840 -1576915383 -443567851 -3239180423 -3373382826 -3275169686 -3720569364 -2789290573 -618407468 -3601134391 -257166085 -951339096 -688447921 -2980268332 -4041231849 -2665838137 -2152080166 -3061402473 -114075645 -1066757169 -3059147274 -246562262 -3880192386 -4271112646 -3614603334 -3491130170 -332943583 -1921692081 -159629030 -4169931400 -641090334 -2429776133 -152825723 -2237958331 -2779470898 -872209389 -1543398313 -227922013 -1433480097 -2411689409 -4285411687 -2669236754 -2315690542 -2593947855 -2435538281 -640615264 -2183831503 -2141774460 -498759490 -1981068107 -659087394 -644660319 -4084740067 -306553019 -4172422758 -761521931 -2820900477 -160799031 -3875345091 -1347385004 -2312301814 -404607200 -2258507054 -1861096434 -3113292015 -1063461481 -3623153239 -11376533 -1748307784 -1185247326 -1030491484 -3925346575 -4212727269 -4234599042 -4019013354 -3237401702 -1335471143 -3405720069 -4119823939 -1476030215 -1339973082 -3541240200 -608243180 -4149852723 -3655893277 -2099999624 -3547173299 -860208608 -4254465956 -603882225 -1785239865 -3260029982 -83829029 -3136481952 -2052207849 -1971968310 -2157083216 -3415051802 diff --git a/test.fastq.bgzip.gz b/test.fastq.bgzip.gz deleted file mode 100644 index 24d949d..0000000 --- a/test.fastq.bgzip.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:95c770e328b56169ab48a3f1681dca55719924409b2e3d3b24a6e74d8bce6d5b -size 1556539 diff --git a/test.fastq.gz b/test.fastq.gz deleted file mode 100644 index 233d5db..0000000 --- a/test.fastq.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:110fd6cd976092bb0fee2a828c9aeb7a03224c4428a1438b02a6b590e4759a68 -size 1660692 diff --git a/zlib-ng-0.4.1.tar.gz b/zlib-ng-0.4.1.tar.gz deleted file mode 100644 index 6183172..0000000 --- a/zlib-ng-0.4.1.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:153183724143711c92bd243528b97fdd3b2426c778079498b882fce445a68421 -size 2459224 diff --git a/zlib-ng-0.5.1-gh.tar.gz b/zlib-ng-0.5.1-gh.tar.gz new file mode 100644 index 0000000..303e220 --- /dev/null +++ b/zlib-ng-0.5.1-gh.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c88d03c7727f97018e1bddd54bd341942ca45659368b4a772167f22d34f2fa50 +size 3381700 diff --git a/zlib_ng-0.5.1.tar.gz b/zlib_ng-0.5.1.tar.gz new file mode 100644 index 0000000..addc156 --- /dev/null +++ b/zlib_ng-0.5.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:32a46649e8efc21ddd74776a55366a8d8be4e3a95b93dc1f0ffe3880718990d9 +size 2436421