Sync from SUSE:SLFO:Main python-lz4 revision 1338cbe7118d9cd9b65c8b3b4dcb03e9

This commit is contained in:
Adrian Schröter 2024-05-03 21:27:28 +02:00
commit 932ea7f508
5 changed files with 433 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -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

7
_constraints Normal file
View File

@ -0,0 +1,7 @@
<constraints>
<hardware>
<physicalmemory>
<size unit="M">4000</size>
</physicalmemory>
</hardware>
</constraints>

BIN
lz4-4.3.2.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

333
python-lz4.changes Normal file
View File

@ -0,0 +1,333 @@
-------------------------------------------------------------------
Sun Mar 12 03:00:40 UTC 2023 - Ben Greiner <code@bnavigator.de>
- Update to v4.3.2
* Fixups by @jonathanunderwood in #266
- Release 4.0.1
* Add flush method to LZ4FrameFile by @pedrovhb in #245
- Release 4.0.0
* This release relegates the stream bindings to experimental
status and disables them in all wheel builds. This was necessary
as the test suite was causing build failures on multiple
architectures. These bindings are currently in an unmaintained
state.
- Clean specfile and test suite setup
-------------------------------------------------------------------
Mon Dec 13 20:23:17 UTC 2021 - Ben Greiner <code@bnavigator.de>
- update to 3.1.10:
* LZ4FrameFile.write()/LZ4FrameDecompressor.decompress() handle
buffer protocol correctly (#227, #228). Thanks to @judahrand.
* Pass source_size kwarg through from frame.open to LZ4FrameFile
instance (#224, #225). Thanks to @shawnperdue.
* Add readall to LZ4FrameFile and use it on python 3.10 (#219,
#220). Thanks to @vaartis.
-------------------------------------------------------------------
Fri Nov 19 10:45:28 UTC 2021 - pgajdos@suse.com
- remove pytest-runner from BuildRequires, it is not needed
-------------------------------------------------------------------
Thu Jan 28 22:59:45 UTC 2021 - Dirk Müller <dmueller@suse.com>
- update to 3.1.3:
* Travis fixes
* Wheels for 3.9
* Correct how pkgconfig is handled in setup.py to account for multiple build flags
* Improve how CHAR_BIT is handled
* adds block size record support to the stream bindings
* fixups to the tests to reduce execution time
-------------------------------------------------------------------
Wed Apr 15 08:43:23 UTC 2020 - pgajdos@suse.com
- version update to 3.0.2
* Remove dead code
* Drop Python 2 support, add streams bindings, improve frame performance
- use system lz4
-------------------------------------------------------------------
Mon Jun 17 11:57:13 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
- Update to 2.1.10:
* Cleanup some code in _block.c to suppress some compiler warnings
* Add some more detail to the install docs
-------------------------------------------------------------------
Thu Feb 7 18:37:13 UTC 2019 - Todd R <toddrme2178@gmail.com>
- Disable tests. They timeout randomly.
-------------------------------------------------------------------
Tue Feb 5 18:37:24 UTC 2019 - Todd R <toddrme2178@gmail.com>
- Version update to 2.1.6
* This release contains no user facing changes, but does include a built wheel built for Python 2.7 on OSX.
* This release follows some re-working of the CI/CD infrastructure, and integration with the codecov service.
- Version update to 2.1.5
* This release contains no functional changes other than changes to the Appveyor configuration for publishing wheels.
- Version update to 2.1.4
* This release contains no functional changes other than changes to the Travis configuration for publishing wheels.
- Version update to 2.1.3
* A simplification of the tox.ini file (thanks to @jdufresne)
* More robust checking for pkgconfig availability (#158, thanks to @raymondEhlers)
* Integration of cibuildwheel into travis builds so as to build and publish binary wheels for Linux and OSX (fixes #99 , #144 , #153)
* Only require pytest-runner if pytest/test is being called (fixes #161)
* Blacklists version 3.3.0 of pytest which has a bug that can cause the tests to fail.
- Version update to 2.1.2
* Improves the speed of importing the module by avoiding the use of pkg_resources (#154) - thanks to @cgohike)
* Fixes some flake8 warnings
* Resolves a small issue with the test suite when detecting memory usage increases
-------------------------------------------------------------------
Thu Oct 25 12:35:12 UTC 2018 - Tomáš Chvátal <tchvatal@suse.com>
- Version update to 2.1.1:
* fixes a bug with the block format compression/decompression
* the handling of errors for block decompression when uncompressed_size > 0
* introduce a new exception: LZ4BlockError which is raised whenever the LZ4 library fails
-------------------------------------------------------------------
Fri Jul 20 08:09:49 UTC 2018 - tchvatal@suse.com
- Version update to 2.0.2:
* Tests moved to pytest
* Upstream does not provide changelog except git log
* Many tests were added fixing various crashes
- Enable tests
-------------------------------------------------------------------
Fri Jul 21 08:27:32 UTC 2017 - aloisio@gmx.com
- Set correct license
-------------------------------------------------------------------
Thu Jul 6 15:20:55 UTC 2017 - tbechtold@suse.com
update to version v0.10.1
* Update bundled lz4 files to v1.7.4-2 version
* Add Python 3.6 builds to AppVeyor
* Fix indentation
* Update bundled lz4 sources to version 1.7.5
* Use GET_SIZE macros to avoid unecessary second check
* Set default store_size
* Remove mixed code and decls in compress_begin
* Fix module initialization in _frame.c
* Replace check_output for compatibility with Python 2.6.
* Make _frame.decompress fail() on leftover bytes like json.loads() do
* Fix VS2015 compile errors
* Fix up adding of appveyor directory to PATH
* Fix up appveyor.yml again
* Fix documentation to give no sphinx warnings
* Add more frame tests
* Update tests for bytes/bytearray for block/Py3
* Add content_size argument to LZ4FrameCrompressor
* Return bytes object from block functions on Python3 (#35)
* Rework decompress in _block.c
* Fix error message again
* Don't mix code and decls so Visual Studio builds work
* Make error message a bit clearer
* Address review comments
* Really remove deprecation warnings from tests
* Revert "Conditionalize extra PyModuleDef initializers on Python 3 in _frame.c"
* Remove mixed code and decls in compress_update
* Add ability to specify uncompressed size to decompress
* Remove unused variable
* Disable bdist_msi and bdist_wininst creation in appveyor
* Add setup.cfg
* Add appveyor.yml
* Tweak the increase in size of the destination buffer when needed
* Accept a bytes or bytearray object in block (de)compress) functions (#16)
* Properly cater for buffering (autoFlush=0) in compress_update
* Add support for disabling optional contentSize in frame header
* Rework some docstrings. Still in progress.
* Revert "Fix warning about missing initializer for PyModuleDef in _block.c"
* Rework decompress function completely
* Remove unused typedefs and move inline definitions to top of _frame.c
* Fix errors in appveyor.yml
* Add return_bytearray kwarg on Py3 for block funcs
* Update author and author_email in setup.py
* Update docsctrings and comments
* Grab GIL when realloc'ing in decompress
* Fix error message in compress_end
* Add Python 3.6 classifier to setup.py
* Make _frame.create_compression_context raise TypeError on bad arguments
* Fix typo in docstring
* Clean up appveyor.yml; remove unused files
* Make tests in test_frame.py pass
* Rework compiler handling in setup.py
* Cleanup some white space
* Finish source_size docstring entry
* Re-organize pre-processor defines in _block.c
* Add test for zero size input for block compress/decompress (#27)
* Remove lz4ex-src/py3c*
* Use py3c headers in _block.c
* Add threaded tests with store_size=False
* Drop _frame.free_compression_context and make context self-cleaning
* Remove lz4ex-src/lz4
* Update lz4.frame.rst
* Add LZ4Compressor class and context manager (WIP)
* Update docstrings
* Improve GIL handling in _frame.c
* Remove mixed code and decls in compress_frame
* Fix some memory leaks
* Conditionalize extra PyModuleDef initializers on Python 3 in _frame.c
* Update LZ4FrameCompressor tests to use compress_begin()
* Fix lz4.frame.decompress crash caused by incorrect realloc() usage
* Fix raw memory disclosure in lz4.decompress
* Add tests for when size isn't stored in compressed block
* Move lz4version to its own extension module
* Add dev-requirements.txt
* Run astyle over _frame.c
* Conditionalize extra PyModuleDef initializers on Python 3 in _block.c
* Configure nose
* Re-order func definitions to avoid need of extra prototype
* Update shields in README.rst
* Rename test.py to test_block.py
* Add destructor function for compression context object
* More work on LZ4Compressor class
* Add appveyor helper script directory
* Revert "Break overly long line"
* Move Visual Studio handling to top of _block.c
* Update .gitignore
* Check prefs memory allocation is successful
* Remove mixed code and decls in create_compression_context
* Add content back into README.rst as github doesn't recognize toctree
* Delete lz4ex dirs
* Fix python 2.6 compatibility broken in 9b088dd6 while dropping free_compression_context
* Update bundled py3c headers to version 0.8
* Change logic for arguments to block functions to fallback to bytes (#35)
* Update README.rst
* Check PyBytes_FromStringAndSize return value in compress_end
* Remove mixed code and decls in compress_end
* Revert "Conditionalize extra PyModuleDef initializers on Python 3 in _block.c"
* Fix endless loop in lz4.frame.decompress being fed with truncated frame
* Rework compress logic
* Allow dest size of 0 in block decompress (#27)
* Fix up appveyor.yml yet again
* Fix warning about missing initializer for PyModuleDef in _frame.c
* Fix some doc typos
* Import sys in setup.py and fix build for mingw (#23)
* Bump lz4.LZ4_VERSION to match bundled code (diverged since e38eea22)
* Indentation fix in _block.c
* Remove module_types.h from lz4ex-src
* Add tests for content_size option when compressing frames
* Remove check for zero size in block compress (#27)
* Use PyDoc_STRVAR for docstrings in _frame.c
* Remove mixed code and decls in decompress
* Don't free context when it wasn't allocated in this function
* Fix source_start and source_size when decompressing with size passed in
* Remove py_lz4_ prefix from function names in _block.c
* Add destructor for prefs object
* Remove erroneous duplicated line from compress_end
* Add coverage module to dev-requirements.txt
* Drop version_scheme from setup.py
* Return bytearray instead from block (de)compress for Python3 (#16)
* Add build.cmd and further simplify appveyor.yml
* Tidy up destruct_compression_context
* Update shields in README.rst (still needs work)
* Avoid compound literal to fix MSVC compilation.
* Remove __init__.py from lz4ex-tests
* Add multithreaded frame test
* Move deprecated defs to top level and use a deprecated decorator
* Typo: "pyton" -> "python"
* Re-add setting of LZ4_VERSION logic to setup.py
* Fix typos
* More removal of decls from code in decompress
* Execute test_compress_without_content_size on all pythons
* Add destructor function for decompression context object
* Be consistent with PyArg_ParseTupleAndKeywords use
* Simplify appveyor setup
* Break overly long line
* Increase frame test coverage
* fix HIGH_COMPRESSION should call LZ4_compress_HC
* Add erquirements.txt to force a sphinx version for RTD
* Fix decompress for when more than one realloc occurs
* Fixup handling of content_size_header in _frame.c
* Enable autoFlush option in compress_begin, compress_end
* Fix up indentation problems
* Remove unecessary undef
* Fix broken test_decompress_ui32_overflow on Windows/Visual C
* Refacter README.rst in terms of docs/ files
* Add store_size option to compress
* Fix doc typos
* Fix dest_size upper bound check
* Use py3c to initialize _block module
* Simplify and clarify decompress
* Fix up various logical inconsistencies
* Update frame docs
* Remove content_size from LZ4FrameCompressor
* Fix python 2.6 and 3.x compatibility broken in 54fe1ed7
* Remove extraneous word in docstring
* Drop all support for Python 3.2 and 3.3
* Remove unnecessary content_size frmo LZ4FrameCompressor
* Revert "Fix warning about missing initializer for PyModuleDef in _frame.c"
* Refactor, simplify and cleanup setup.py
* Don't automatically call compress_begin()
* Fix documentation error regarding block_mode numerical values and defaults
* Use system py3c headers if found, otherwise use bundled ones
* Add Python 3.6 to Travis builds
* Fix typo in error message
* Add readthedocs badge to README.rst
* Require sphinx 1.4.8 or later and use internal napoleon plugin
* Remove mixed code and decls in free_compression_context
* Release GIL when it's possible to do so
* Improve documentation
* Remove deprecation warning when testing block
* Remove mixed code and decls in get_frame_info
* Issue #16: accept arbitrary buffer-compatible objects
* Properly use pkg-config to configure liblz4
* Fix non-ascii character
* Fix awkward linebreak
* Simplify appveyor setup further
* Add AppVeyor badge to README.rst
* Documentation updates
* Fix compression values for block HC to be consistent with 1z4 v1.7.5
* Add tests for autoFlush=0 case
* Fix warning about missing initializer for PyModuleDef in _block.c
* Move lz4frame_test.py to tests dir and rename
* Improve commentary
* Fix up some docstrings in _frame.c
* Remove auto_flush kwarg from compress_frame
* Add bytearray test for block (de)compress
* Update documentation
* Add sphinx documentation
* Update docs to reflect pre-release state of frame support
* Consolidate code in _frame.c
* Bundle py3c 0.7 headers to build on systems lacking them
* Remove source_size docstring from compress and add it to compress_begin
* Make block compress docstring reflect LZ4 version
* Update bench.py
* Clarify error message in _block.c
* Check return value of compress functions
* Rename compress_frame to compress
* Use PyErr_SetString instead of PyErr_Format in compress_begin
* Fix error message in _block.c and corresponding tests
- convert to singlespec
-------------------------------------------------------------------
Sun Oct 19 11:02:23 UTC 2014 - p.drouand@gmail.com
- Update to version 0.7.0
+ No changelog available
- Add python-nose build requirement; new dependency needed for launching
tests
-------------------------------------------------------------------
Sun Dec 8 17:59:08 UTC 2013 - p.drouand@gmail.com
- Update to version 0.6.0
+ No changelog available
- Remove depreciated python(abi) = %{py_ver} requirement
-------------------------------------------------------------------
Thu Oct 24 11:08:09 UTC 2013 - speilicke@suse.com
- Require python-setuptools instead of distribute (upstreams merged)
-------------------------------------------------------------------
Thu Nov 29 16:42:09 UTC 2012 - toddrme2178@gmail.com
- Initial spec file

67
python-lz4.spec Normal file
View File

@ -0,0 +1,67 @@
#
# spec file for package python-lz4
#
# Copyright (c) 2023 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/
#
Name: python-lz4
Version: 4.3.2
Release: 0
Summary: LZ4 Bindings for Python
License: BSD-3-Clause
Group: Development/Languages/Python
URL: https://github.com/python-lz4/python-lz4
Source: https://files.pythonhosted.org/packages/source/l/lz4/lz4-%{version}.tar.gz
BuildRequires: %{python_module devel >= 3.7}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module pkgconfig}
BuildRequires: %{python_module psutil}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module setuptools}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: liblz4-devel >= 1.7.5
BuildRequires: python-rpm-macros
%python_subpackages
%description
This package provides python bindings for the lz4 compression library.
%prep
%setup -q -n lz4-%{version}
%build
# not neccessary, but ensure we use system lib
rm -r lz4libs
export CFLAGS="%{optflags}"
%pyproject_wheel
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitearch}
%check
# lz4.stream is not compiled by default: https://github.com/python-lz4/python-lz4/issues/240
ignoretest="--ignore tests/stream"
%pytest_arch $ignoretest
%files %{python_files}
%license LICENSE
%doc README.rst
%{python_sitearch}/lz4/
%{python_sitearch}/lz4-%{version}.dist-info
%changelog