From 8181ca9836ee3911d22fa129684add45dfad0c51fa5aa304da8dc1b88573c9ce Mon Sep 17 00:00:00 2001 From: Steve Kowalik Date: Thu, 19 Dec 2024 08:20:12 +0000 Subject: [PATCH] - Update to 2.9.1 * Add Cargo.lock and bump patch version by @milesgranger in #192 - Release 2.9.0 * Bump libcramjam/isal-rs by @milesgranger in #183 * Add cramjam.zlib, cramjam.experimental.izlib, and cramjam.experimental.ideflate by @milesgranger in #184 - Release 2.8.4 * Add cramjam.experimental.blosc2 * Add cramjam.experimental.igzip (on 64bit targets) * Add wasm32 emscripten build and test for pyodide - Release 2.8.3 * Move LZMA / XZ out of experimental to xz submodule by @milesgranger in #133 * Remove unused Cargo.lock files by @milesgranger in #149 * Fix tests that assume C char is signed by @musicinmybrain in #150 - Release 2.8.2 * Remove zstd-safe dep in libcramjam by @milesgranger in #132 * Remove relative libcramjam dep for python builds by @milesgranger in #131 * Impl eq for python Buffer by @milesgranger in #135 * Fix missing LICENSE file in cramjam-cli by @musicinmybrain in #137 * Adjust the binary name in the cramjam-cli example by @musicinmybrain in #138 * Cargo.toml: set workspace.resolver to 2 by @veprbl in #140 - Add cramjam-opensuse-config.patch: Use some system libraries and avoid static linking - Add cramjam-issue193-test_variants.patch gh#milesgranger/cramjam#193 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-cramjam?expand=0&rev=13 --- .gitattributes | 23 ++++ .gitignore | 1 + _multibuild | 4 + _service | 25 +++++ cramjam-2.8.1.obscpio | 3 + cramjam-2.8.1.tar.xz | 3 + cramjam-2.9.1.tar.xz | 3 + cramjam-issue193-test_variants.patch | 28 +++++ cramjam-opensuse-config.patch | 29 +++++ cramjam.obsinfo | 4 + python-cramjam.changes | 151 +++++++++++++++++++++++++++ python-cramjam.spec | 100 ++++++++++++++++++ vendor.tar.xz | 3 + 13 files changed, 377 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 _multibuild create mode 100644 _service create mode 100644 cramjam-2.8.1.obscpio create mode 100644 cramjam-2.8.1.tar.xz create mode 100644 cramjam-2.9.1.tar.xz create mode 100644 cramjam-issue193-test_variants.patch create mode 100644 cramjam-opensuse-config.patch create mode 100644 cramjam.obsinfo create mode 100644 python-cramjam.changes create mode 100644 python-cramjam.spec create mode 100644 vendor.tar.xz 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..b030889 --- /dev/null +++ b/_multibuild @@ -0,0 +1,4 @@ + + + test + diff --git a/_service b/_service new file mode 100644 index 0000000..7d79ed1 --- /dev/null +++ b/_service @@ -0,0 +1,25 @@ + + + https://github.com/milesgranger/cramjam.git + git + @PARENT_TAG@ + + v2.9.1 + v(.*) + \1 + + + + *.tar + xz + + + + cramjam + xz + true + + + cramjam + + diff --git a/cramjam-2.8.1.obscpio b/cramjam-2.8.1.obscpio new file mode 100644 index 0000000..6b3037f --- /dev/null +++ b/cramjam-2.8.1.obscpio @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:50e24fa65facd333951a4a0e029187e615e30244e3146137157330a5f8eee82e +size 3311116 diff --git a/cramjam-2.8.1.tar.xz b/cramjam-2.8.1.tar.xz new file mode 100644 index 0000000..331fd63 --- /dev/null +++ b/cramjam-2.8.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b8675fe7d3f5c26ad5927f20f1172c58d1ef3ceae105c0623966acb4599a0785 +size 843748 diff --git a/cramjam-2.9.1.tar.xz b/cramjam-2.9.1.tar.xz new file mode 100644 index 0000000..578f27c --- /dev/null +++ b/cramjam-2.9.1.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b52175262a350c7aa536bdd8e1b31574de6c6ce475e83cb4e0a56a438349a8bd +size 56142388 diff --git a/cramjam-issue193-test_variants.patch b/cramjam-issue193-test_variants.patch new file mode 100644 index 0000000..48a0295 --- /dev/null +++ b/cramjam-issue193-test_variants.patch @@ -0,0 +1,28 @@ +Index: cramjam-2.9.1/tests/test_variants.py +=================================================================== +--- cramjam-2.9.1.orig/tests/test_variants.py ++++ cramjam-2.9.1/tests/test_variants.py +@@ -104,7 +104,7 @@ def test_variants_raise_exception(varian + "output_type", (bytes, bytearray, "numpy", cramjam.Buffer, cramjam.File, memoryview) + ) + @pytest.mark.parametrize("variant_str", VARIANTS) +-@given(raw_data=st.binary()) ++@given(raw_data=st.binary(min_size=2)) + def test_variants_compress_into( + variant_str, input_type, output_type, raw_data, tmp_path_factory, is_pypy + ): +@@ -174,13 +174,10 @@ def test_variants_compress_into( + "output_type", (bytes, bytearray, "numpy", cramjam.Buffer, cramjam.File, memoryview) + ) + @pytest.mark.parametrize("variant_str", VARIANTS) +-@given(raw_data=st.binary()) ++@given(raw_data=st.binary(min_size=2)) + def test_variants_decompress_into( + variant_str, input_type, output_type, tmp_path_factory, raw_data, is_pypy + ): +- if variant_str == "izlib" and output_type == "memoryview": +- pytest.skip("See issue https://github.com/milesgranger/cramjam/issues/193") +- + variant = getattr(cramjam, variant_str) + + compressed = variant.compress(raw_data) diff --git a/cramjam-opensuse-config.patch b/cramjam-opensuse-config.patch new file mode 100644 index 0000000..20c5e15 --- /dev/null +++ b/cramjam-opensuse-config.patch @@ -0,0 +1,29 @@ +--- cramjam/pyproject.toml 2024-12-18 12:38:18.002576474 +0100 ++++ cramjam.patch/pyproject.toml 2024-12-18 14:11:22.834831651 +0100 +@@ -14,7 +14,25 @@ + build-backend = "maturin" + + [tool.maturin] +-strip = true ++no-default-features = true ++features = [ ++ "extension-module", ++ "snappy", ++ "lz4", ++ "bzip2", ++ "brotli", ++ "zstd", ++ "xz-shared", ++ "igzip-shared", ++ "ideflate-shared", ++ "izlib-shared", ++ "use-system-isal-shared", ++ "gzip-shared", ++ "zlib-shared", ++ "deflate-shared", ++ "blosc2-shared", ++ "use-system-blosc2-shared" ++] + + [project.optional-dependencies] + dev = [ diff --git a/cramjam.obsinfo b/cramjam.obsinfo new file mode 100644 index 0000000..3ee3d44 --- /dev/null +++ b/cramjam.obsinfo @@ -0,0 +1,4 @@ +name: cramjam +version: 2.9.1 +mtime: 1734006355 +commit: 6b30efc6ee36c80f7a4e1311cc8e9119905b03e0 diff --git a/python-cramjam.changes b/python-cramjam.changes new file mode 100644 index 0000000..996fb9c --- /dev/null +++ b/python-cramjam.changes @@ -0,0 +1,151 @@ +------------------------------------------------------------------- +Wed Dec 18 11:40:10 UTC 2024 - Ben Greiner + +- Update to 2.9.1 + * Add Cargo.lock and bump patch version by @milesgranger in #192 +- Release 2.9.0 + * Bump libcramjam/isal-rs by @milesgranger in #183 + * Add cramjam.zlib, cramjam.experimental.izlib, and + cramjam.experimental.ideflate by @milesgranger in #184 +- Release 2.8.4 + * Add cramjam.experimental.blosc2 + * Add cramjam.experimental.igzip (on 64bit targets) + * Add wasm32 emscripten build and test for pyodide +- Release 2.8.3 + * Move LZMA / XZ out of experimental to xz submodule by + @milesgranger in #133 + * Remove unused Cargo.lock files by @milesgranger in #149 + * Fix tests that assume C char is signed by @musicinmybrain in + #150 +- Release 2.8.2 + * Remove zstd-safe dep in libcramjam by @milesgranger in #132 + * Remove relative libcramjam dep for python builds by + @milesgranger in #131 + * Impl eq for python Buffer by @milesgranger in #135 + * Fix missing LICENSE file in cramjam-cli by @musicinmybrain in + #137 + * Adjust the binary name in the cramjam-cli example by + @musicinmybrain in #138 + * Cargo.toml: set workspace.resolver to 2 by @veprbl in #140 +- Add cramjam-opensuse-config.patch: Use some system libraries and + avoid static linking +- Add cramjam-issue193-test_variants.patch + gh#milesgranger/cramjam#193 + +------------------------------------------------------------------- +Wed Aug 14 15:11:07 UTC 2024 - Dirk Müller + +- use modern python on sle15 + +------------------------------------------------------------------- +Mon Feb 19 09:16:39 UTC 2024 - Atri Bhattacharya + +- Update to version 2.8.1: + * Experimental support for LZMA / XZ codec + (gh#milesgranger/cramjam#127). + * In libcramjam, bump zstd to 0.13.0 (to go with zstd-safe + 7.0.0) (gh#milesgranger/cramjam#128). + * Bump rustix from 0.37.17 to 0.38.28 in /cramjam-python + (gh#milesgranger/cramjam#122). +- Changes from version 2.8.0: + * Bump zstd from 1.5.0.2 to 1.5.4.0 in /cramjam-python + (gh#milesgranger/cramjam#108). + * Simpler isinstance() calls (gh#milesgranger/cramjam#111). + * Support Python 3.12 (gh#milesgranger/cramjam#113). + * Bump rustix from 0.37.18 to 0.37.25 + (gh#milesgranger/cramjam#114). + * Fix docstring for lz4.compress_block_bound + (gh#milesgranger/cramjam#117). + * Use pyo3 0.20 (gh#milesgranger/cramjam#118). + * Make libcramjam a better libcramjam w/ C API + (gh#milesgranger/cramjam#119). + * Fix missing license file in the Python sdist and bdist/wheel + (gh#milesgranger/cramjam#124). + * Support independent mode in LZ4 compressor + (gh#milesgranger/cramjam#125). +- Changes from version 2.7.0: + * Bump bzip2 from 0.4.3 to 0.4.4 (gh#milesgranger/cramjam#94). + * Refactoring, release GIL, Decompressor, remove mimalloc, etc. + (gh#milesgranger/cramjam#96). + * Accept anything with Buffer Protocol, remove numpy + (gh#milesgranger/cramjam#100). + * Refactor into workspaces: libcramjam, cramjam-python, and + cramjam-cli (gh#milesgranger/cramjam#101). + * Basic CLI improvements (gh#milesgranger/cramjam#103). + * Fix cramjam-cli decompress bug (gh#milesgranger/cramjam#104). + * Support all buffer types where c-contiguous + (gh#milesgranger/cramjam#105). + * Fixes for maturin v1 --universal2 removal + (gh#milesgranger/cramjam#109). +- pyrus-cramjam is now simply cramjam; adapt to name change in + spec and _service file. +- Drop cargo_config: Updated rust packaging services include it in + vendor.tar.xz. +- Split out test into multibuild flavor since it takes a long time + to run (about an hour). + +------------------------------------------------------------------- +Fr- Jan 13 11:04:41 UTC 2023 - Ben Greiner + +- Update to v2.6.2 + * Bump pyo3, numpy and expand pyproject.toml by @milesgranger in + #90 +- Updated crate fixes bzip2 < 0.4.4 vulnerability + * boo#1207039, CVE-2023-22895 + +------------------------------------------------------------------- +Sat Oct 29 09:30:13 UTC 2022 - Ben Greiner + +- Update to v2.6.1 + * Switch brotli2 -> brotli crate by @milesgranger in #87 + +------------------------------------------------------------------- +Fri Oct 28 16:05:38 UTC 2022 - Ben Greiner + +- Update to v2.6.0 + * Update to pyo3 0.16 by @messense in #78 + * Update dependencies and simplify CI by @messense in #79 + * Support Lz4 de/compress_block_into functions by @milesgranger + in #80 + * Upgrade maturin to 0.13.0 by @messense in #81 + * Integration tests, benchmark updates, subclass Buffer by + @milesgranger in #83 + * Bump lz4-sys from 1.9.3 to 1.9.4 by @dependabot in #84 + * Add Python 3.11 by @milesgranger in #85 +- Release v2.5.0 + * Incorporate property-based testing by @milesgranger in #69 + * Support bzip2 by @milesgranger in #70 +- Release v2.4.0 + * This release comes with streaming compression support for all + variants. And updates Gzip compression variant to support + properly decoding input which has multiple streams, as is the + default with std gzip lib. This release does not alter any of + the existing APIs. + * Support compressed gzip multistream (#64) b9cfa13 + * Support Compressor for each variant (#64) 8ecb0fa + * Support .flush for Compressor (#68) 4b92e42 + * Add official OSI name in the license metadata (#66) 446a671 + +------------------------------------------------------------------- +Tue Sep 28 01:17:05 UTC 2021 - William Brown + +- Replace rust-packaging with cargo-packaging + +------------------------------------------------------------------- +Mon Jul 19 19:37:30 UTC 2021 - Ben Greiner + +- Update to 2.3.2 + * no core library code changes +- Update filelist due to updated setuptools: not a single .so but + a full module directory now. +- run cargo crate service: update vendored rust crates +- re-activate cargo audit service + * gh#openSUSE/obs-service-cargo_audit#1 is fixed + +------------------------------------------------------------------- +Tue May 18 14:12:27 UTC 2021 - Ben Greiner + +- initial specfile for 2.3.1 +- new requirement of python-fastparquet 0.6 +- use rust cargo crate vendoring following the how-to from + https://fy.blackhats.net.au/blog/html/2021/02/15/getting_started_packaging_a_rust_cli_tool_in_suse_obs.html diff --git a/python-cramjam.spec b/python-cramjam.spec new file mode 100644 index 0000000..c027c90 --- /dev/null +++ b/python-cramjam.spec @@ -0,0 +1,100 @@ +# +# spec file for package python-cramjam +# +# 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" +%bcond_without test +%define psuffix -test +%else +%bcond_with test +%define psuffix %{nil} +%endif + +# Adjust the version in _service and use `rm -rf cramjam; osc service runall` in order to update +%define modname cramjam +%{?sle15_python_module_pythons} +Name: python-cramjam%{psuffix} +Version: 2.9.1 +Release: 0 +Summary: Thin Python bindings to de/compression algorithms in Rust +License: MIT +URL: https://github.com/milesgranger/cramjam +Source: %{modname}-%{version}.tar.xz +Source1: vendor.tar.xz +# PATCH-FEATURE-OPENSUSE cramjam-opensuse-config.patch code@bnavigator.de -- Use system libraries and avoid static linking +Patch0: cramjam-opensuse-config.patch +# PATCH-FIX-UPSTREAM cramjam-issue193-test_variants.patch gh#milesgranger/cramjam#193 +Patch1: cramjam-issue193-test_variants.patch +BuildRequires: %{python_module base >= 3.8} +BuildRequires: %{python_module maturin >= 0.13} +BuildRequires: %{python_module pip} +BuildRequires: autoconf +BuildRequires: automake +BuildRequires: cargo-packaging +BuildRequires: cmake +BuildRequires: libtool +BuildRequires: nasm +BuildRequires: python-rpm-macros +BuildRequires: pkgconfig(blosc2) +BuildRequires: pkgconfig(libisal) +BuildRequires: pkgconfig(libzstd) +# SECTION test dependencies +%if %{with test} +BuildRequires: %{python_module %{modname} = %{version}} +BuildRequires: %{python_module hypothesis} +BuildRequires: %{python_module memory_profiler} +BuildRequires: %{python_module numpy} +BuildRequires: %{python_module pytest-xdist} +BuildRequires: %{python_module pytest} +%endif +# /SECTION +BuildRequires: fdupes +%python_subpackages + +%description +Extremely thin Python bindings to de/compression algorithms in Rust. +Allows for using algorithms such as Snappy, without any system dependencies. + +%prep +%autosetup -p1 -n %{modname}-%{version} -a1 + +%build +%if %{without test} +export ZSTD_SYS_USE_PKG_CONFIG=1 +%pyproject_wheel +%endif + +%install +%if %{without test} +%pyproject_install +%python_expand %fdupes %{buildroot}%{$python_sitearch} +%endif + +%check +%if %{with test} +%pytest_arch -n auto --ignore benchmarks +%endif + +%if %{without test} +%files %{python_files} +%license LICENSE +%{python_sitearch}/%{modname} +%{python_sitearch}/%{modname}-%{version}.dist-info +%endif + +%changelog diff --git a/vendor.tar.xz b/vendor.tar.xz new file mode 100644 index 0000000..d005f3b --- /dev/null +++ b/vendor.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:143bb6d8474ca2f4acbe2081bc4eb4b9e7458aafde700734f6abbb3deaf05d90 +size 19202980