* 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
109 lines
3.3 KiB
RPMSpec
109 lines
3.3 KiB
RPMSpec
#
|
|
# 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
|