14
0
forked from pool/python-py7zr

- Update to 1.0.0

* Changed
    - CI: check on Linux on ARM64 with GitHub hosted ARM64 runner.
    - Improve issue report template
    - Remove Travis-CI button from Documentation
- Changes from 0.22.0
  * Added
    - Add mode "x" for SevenZipFile (#588)
    - Add SevenZipFile#namelist method (#600)
  * Fixed
    - Append mode on non-existent files (#604)
    - Fix NUMBER encoding of integer when 8 bytes(#591)
  * Changed
    - Minimum required Python version to be Python 3.8 (#601)
    - Remove pyannotate from pyproject.toml (#598)
  * Document
    - Update user guide (#596)
- Changes from 0.21.1
  * Fixed
    - Follow shutil.register_unpack_format() convention of raising a ReadError when the library cannot handle a file (#583)
    - ensure unpack_7zarchive closes the archive (#584)
    - 64bit OS detection (#580)
  * Added
    - Add recursive sub-directories and files extraction (#585)
  * Changed
    - check targets argument type for read and extract method (#577)
    - Treat zero byte stream as a file (#551)
- Changes from 0.21.0
  * Changed
    - Speed up extraction when number of files is very large (#555)
    - Replace deprecated functions on python 3.12 (#550)
  * Added
    - Add report_update() for logging large files extraction (#558)
  * Document
    - Add subsection of multi-volume creation (#568)
- Drop py7zr-remove-pyannotate.patch because no more needed.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-py7zr?expand=0&rev=20
This commit is contained in:
2025-06-22 16:29:34 +00:00
committed by Git OBS Bridge
commit 966e4df82c
8 changed files with 321 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

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
.osc

3
_multibuild Normal file
View File

@@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

3
py7zr-0.20.8.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2a6b0db0441e63a2dd74cbd18f5d9ae7e08dc0e54685aa486361d0db6a0b4f78
size 4988208

3
py7zr-1.0.0.tar.gz Normal file
View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:f6bfee81637c9032f6a9f0eb045a4bfc7a7ff4138becfc42d7cb89b54ffbfef1
size 4965058

View File

@@ -0,0 +1,48 @@
From e539448ce6a0d65371e79dc9f39b7cad59da0476 Mon Sep 17 00:00:00 2001
From: YOKOTA Hiroshi <yokota.hgml@gmail.com>
Date: Mon, 25 Dec 2023 21:03:19 +0900
Subject: [PATCH] Drop pyannotate from test code
pyannotate uses lib2to3 that will be drop in Python 3.13.
So, pyannotate will be obsolete in Python 3.13.
lib2to3 is deprecated in Python 3.11, and it will be removes in Python 3.13.
See also:
https://docs.python.org/3.12/library/2to3.html#module-lib2to3
---
tests/conftest.py | 22 ----------------------
1 file changed, 22 deletions(-)
diff --git a/tests/conftest.py b/tests/conftest.py
index 34ead5ed..c398f866 100644
--- a/tests/conftest.py
+++ b/tests/conftest.py
@@ -4,28 +4,6 @@
import cpuinfo
import pytest
-from pyannotate_runtime import collect_types
-
-
-def pytest_collection_finish(session):
- """Handle the pytest collection finish hook: configure pyannotate.
- Explicitly delay importing `collect_types` until all tests have
- been collected. This gives gevent a chance to monkey patch the
- world before importing pyannotate.
- """
- collect_types.init_types_collection()
-
-
-@pytest.fixture(autouse=True)
-def collect_types_fixture():
- collect_types.start()
- yield
- collect_types.stop()
-
-
-def pytest_sessionfinish(session, exitstatus):
- os.makedirs("build/", exist_ok=True)
- collect_types.dump_stats("build/type_info.json")
def pytest_benchmark_update_json(config, benchmarks, output_json):

132
python-py7zr.changes Normal file
View File

@@ -0,0 +1,132 @@
-------------------------------------------------------------------
Fri Jun 20 09:43:34 UTC 2025 - ecsos <ecsos@opensuse.org>
- Update to 1.0.0
* Changed
- CI: check on Linux on ARM64 with GitHub hosted ARM64 runner.
- Improve issue report template
- Remove Travis-CI button from Documentation
- Changes from 0.22.0
* Added
- Add mode "x" for SevenZipFile (#588)
- Add SevenZipFile#namelist method (#600)
* Fixed
- Append mode on non-existent files (#604)
- Fix NUMBER encoding of integer when 8 bytes(#591)
* Changed
- Minimum required Python version to be Python 3.8 (#601)
- Remove pyannotate from pyproject.toml (#598)
* Document
- Update user guide (#596)
- Changes from 0.21.1
* Fixed
- Follow shutil.register_unpack_format() convention of raising a ReadError when the library cannot handle a file (#583)
- ensure unpack_7zarchive closes the archive (#584)
- 64bit OS detection (#580)
* Added
- Add recursive sub-directories and files extraction (#585)
* Changed
- check targets argument type for read and extract method (#577)
- Treat zero byte stream as a file (#551)
- Changes from 0.21.0
* Changed
- Speed up extraction when number of files is very large (#555)
- Replace deprecated functions on python 3.12 (#550)
* Added
- Add report_update() for logging large files extraction (#558)
* Document
- Add subsection of multi-volume creation (#568)
- Drop py7zr-remove-pyannotate.patch because no more needed.
-------------------------------------------------------------------
Fri Feb 16 15:40:08 UTC 2024 - Ben Greiner <code@bnavigator.de>
- Remove bogus unmaintained pyannotate test dependency
* Add py7zr-remove-pyannotate.patch gh#miurahr/py7zr#552
-------------------------------------------------------------------
Wed Dec 27 13:59:12 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 0.20.8:
* Detect brotli import error (#543)
* refactor: hardening SevenZipFile constructor (#547)
* refactor: improve type safe functions (#545)
-------------------------------------------------------------------
Fri Dec 15 06:16:51 UTC 2023 - ecsos <ecsos@opensuse.org>
- update to 0.20.7:
* Support Python 3.12
- update to 0.20.6
* fix: sanitize path when write (#525)
* fix: allow specify target path in relative path (#530)
* Avoid AttributeError on OpenBSD (#521)
* Error appending file: KeyError: 'lastwritetime' (#517)
* Fixing a string quote in user_guide document(#524)
-------------------------------------------------------------------
Wed Jun 21 11:10:29 UTC 2023 - ecsos <ecsos@opensuse.org>
- Add %{?sle15_python_module_pythons}
-------------------------------------------------------------------
Thu May 4 19:19:16 UTC 2023 - Dirk Müller <dmueller@suse.com>
- update to 0.20.5:
* Remove root reference from file names (#513)
* fix typo in the readme (#510)
* Drop manual GC to improve performance when many files are
handled. (#489, #490)
* Fix mypy error
* Skip deflate64 compression/decompression test on pypy
* There is an issue in dependency inflate64 library that causes
SIGABORT and SIGSEGV on pypy
-------------------------------------------------------------------
Wed Dec 21 10:02:30 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Update to 0.20.2
* Fix error with good path data, when detecting wrong path with
new canonical_path(), and drop resolve() call on path.
- Release 0.20.1
## Security
* Fix sanity check for path traversal attack(#480)
* Add path checker in writef() and writestr() methods that
ignores evil pass.
- When pass arcname as evil path such as
"../../../../tmp/evil.sh"
- it raises ValueError
* Check symlink and junction is under target folder when
extraction
- Release 0.20.0
* Support enhanced deflate compression.(#472)
* Bump setuptools@63 and setuptools_scm@7 (#473)
* Deprecate Python 3.6 support (#473)
- Fixes boo#1206141 CVE-2022-44900
-------------------------------------------------------------------
Fri Jul 15 07:54:24 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Update to version 0.19.0
* big changelog
- Move tests to multibuild
-------------------------------------------------------------------
Thu Jul 14 18:23:24 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Remove ancient python-pathlib from the build requirements but
leave the version as is. An update to the latest version 0.19.0
would require to package many more dependencies.
- Clean up the spec-file a little bit
- Use pytest. No pure python package should ever be untested.
-------------------------------------------------------------------
Sat Apr 3 12:20:11 UTC 2021 - Ismail Dönmez <idonmez@suse.com>
- Fix sed line to use python3 and add a replacement for /usr/bin/python
as well.
-------------------------------------------------------------------
Fri Jan 22 11:45:55 UTC 2021 - ecsos <ecsos@opensuse.org>
- Initial version 0.11.3

108
python-py7zr.spec Normal file
View File

@@ -0,0 +1,108 @@
#
# spec file for package python-py7zr
#
# Copyright (c) 2025 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-py7zr%{psuffix}
Version: 1.0.0
Release: 0
Summary: Library and utility to support 7zip
License: LGPL-2.1-or-later
Group: Development/Languages/Python
URL: https://github.com/miurahr/py7zr
Source0: https://files.pythonhosted.org/packages/source/p/py7zr/py7zr-%{version}.tar.gz
BuildRequires: %{python_module base >= 3.9}
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools >= 63}
BuildRequires: %{python_module setuptools_scm >= 7.0.5}
BuildRequires: %{python_module wheel}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-Brotli >= 1.1.0
Requires: python-multivolumefile >= 0.2.3
Requires: python-psutil
Requires: python-pycryptodomex >= 3.20.0
Requires: python-pyzstd >= 0.16.1
Requires: python-texttable
Requires: (python-inflate64 >= 1.0.0 with python-inflate64 < 1.1.0)
Requires: (python-pybcj >= 1.0.0 with python-pybcj < 1.1.0)
Requires: (python-pyppmd >= 1.1.0 with python-pyppmd < 1.3.0)
%if 0%{?python_version_nodots} < 38
Requires: python-importlib_metadata
%endif
Requires(post): update-alternatives
Requires(postun): update-alternatives
%if %{with test}
BuildRequires: %{python_module py-cpuinfo}
BuildRequires: %{python_module py7zr = %{version}}
BuildRequires: %{python_module pytest-benchmark}
BuildRequires: %{python_module pytest-httpserver}
BuildRequires: %{python_module pytest-remotedata}
BuildRequires: %{python_module pytest-timeout}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module requests}
%endif
BuildArch: noarch
%python_subpackages
%description
py7zr is a library and utility to support 7zip archive compression, decompression, encryption and decryption written by Python programming language.
%prep
%autosetup -p1 -n py7zr-%{version}
# remove shebangs from source
sed -i '1{/#!/d}' py7zr/*.py
%if !%{with test}
%build
%pyproject_wheel
%install
%pyproject_install
%python_clone -a %{buildroot}%{_bindir}/py7zr
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%if %{with test}
%check
%pytest
%endif
%post
%python_install_alternative py7zr
%postun
%python_uninstall_alternative py7zr
%if !%{with test}
%files %{python_files}
%license LICENSE
%doc README.rst docs/Changelog.rst
%{python_sitelib}/py7zr
%{python_sitelib}/py7zr-%{version}.dist-info
%python_alternative %{_bindir}/py7zr
%endif
%changelog