diff --git a/fix-zstd-1.5.6.patch b/fix-zstd-1.5.6.patch new file mode 100644 index 0000000..245fee1 --- /dev/null +++ b/fix-zstd-1.5.6.patch @@ -0,0 +1,34 @@ +https://github.com/indygreg/python-zstandard/pull/221 + +commit e362dd47a0a339cd95a663ca4e54e628060ce6f1 +Author: Bernhard M. Wiedemann +Date: Fri Apr 5 08:55:10 2024 +0200 + + Support zstd-1.5.6 + +diff --git a/c-ext/backend_c.c b/c-ext/backend_c.c +index bf61f9c..aabe30b 100644 +--- a/c-ext/backend_c.c ++++ b/c-ext/backend_c.c +@@ -152,7 +152,7 @@ void zstd_module_init(PyObject *m) { + PyObject *features = NULL; + PyObject *feature = NULL; + unsigned zstd_ver_no = ZSTD_versionNumber(); +- unsigned our_hardcoded_version = 10505; ++ unsigned our_hardcoded_version = 10506; + if (ZSTD_VERSION_NUMBER != our_hardcoded_version || + zstd_ver_no != our_hardcoded_version) { + PyErr_Format( +diff --git a/tests/test_module_attributes.py b/tests/test_module_attributes.py +index 145f7be..1f37b82 100644 +--- a/tests/test_module_attributes.py ++++ b/tests/test_module_attributes.py +@@ -5,7 +5,7 @@ import zstandard as zstd + + class TestModuleAttributes(unittest.TestCase): + def test_version(self): +- self.assertEqual(zstd.ZSTD_VERSION, (1, 5, 5)) ++ self.assertEqual(zstd.ZSTD_VERSION, (1, 5, 6)) + + self.assertEqual(zstd.__version__, "0.22.0") + diff --git a/python-zstandard.changes b/python-zstandard.changes index 32702b0..6693131 100644 --- a/python-zstandard.changes +++ b/python-zstandard.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Fri Apr 5 06:57:08 UTC 2024 - Bernhard Wiedemann + +- Add fix-zstd-1.5.6.patch to work with zstd-1.5.6 + ------------------------------------------------------------------- Tue Mar 5 13:37:35 UTC 2024 - Dominique Leuenberger diff --git a/python-zstandard.spec b/python-zstandard.spec index 947a1db..b00954e 100644 --- a/python-zstandard.spec +++ b/python-zstandard.spec @@ -26,12 +26,13 @@ Group: Development/Languages/Python URL: https://github.com/indygreg/python-zstandard Source: https://files.pythonhosted.org/packages/source/z/zstandard/zstandard-%{version}.tar.gz Patch0: feature-detection.patch +Patch1: fix-zstd-1.5.6.patch BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: libzstd-devel BuildRequires: python-rpm-macros -BuildRequires: zstd = 1.5.5 +BuildRequires: zstd = 1.5.6 Requires: python-cffi >= 1.11 Requires: zstd Conflicts: python-zstd