forked from pool/python-rarfile
- Update to version 4.2
Features:
* Support unrar-free >= 0.2.0.
* Add RarFile.is_solid to check if archive uses solid compression.
Fixes:
* Support old multi-volume archives better where ENDARC does
not contain NEXTVOL.
version 4.1:
Features:
* Support 7zip/p7zip as decompression backend.
* RAR5: check password before trying to read file.
New APIs:
* Make get_rar_version a public function.
* New option: ``part_only`` for :class:`RarFile`,
to read only single file and allow it to be middle-part
of multi-volume archive.
* Add :meth:`RarFile.printdir`, use it in dumprar. Needed to
examine FILE_COPY or HARD_LINK entries that do not contain
data.
Fixes:
* Use OS separator to access filename.
* DirectReader: check seek position on each read.
Fixes read reading from multiple entries in parallel
on RarFile backed by file object.
* DirectReader: properly disable CRC check when seeking.
* Reset _hdrenc_main before processing a new volume.
Fixes CRC checks on multi-volume reads.
* Adapt to Python 3.10 argparse.
* SFX: Handle volume numbering special cases better.
* nsdatetime: support pypy internal use
* Throw error if backend does not support passwords.
Cleanups:
* Avoid isascii, not in 3.6
- Drop help.patch (merged upstream)
OBS-URL: https://build.opensuse.org/request/show/1184025
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rarfile?expand=0&rev=21
82 lines
2.4 KiB
RPMSpec
82 lines
2.4 KiB
RPMSpec
#
|
|
# spec file for package python-rarfile
|
|
#
|
|
# 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/
|
|
#
|
|
|
|
|
|
%define skip_python2 1
|
|
Name: python-rarfile
|
|
Version: 4.2
|
|
Release: 0
|
|
Summary: RAR Archive Reader for Python
|
|
License: ISC
|
|
URL: https://rarfile.readthedocs.org/
|
|
Source0: https://files.pythonhosted.org/packages/source/r/rarfile/rarfile-%{version}.tar.gz
|
|
BuildRequires: %{python_module pytest}
|
|
BuildRequires: %{python_module setuptools}
|
|
BuildRequires: 7zip
|
|
BuildRequires: bsdtar
|
|
BuildRequires: fdupes
|
|
BuildRequires: python-rpm-macros
|
|
BuildRequires: python3-Sphinx >= 1.3
|
|
BuildRequires: unar
|
|
Requires: bsdtar
|
|
Recommends: unar
|
|
BuildArch: noarch
|
|
%python_subpackages
|
|
|
|
%description
|
|
This is a Python module for RAR archive reading. It supports both RAR
|
|
2.x and 3.x archives, multi volume archives, Unicode filenames,
|
|
password-protected archives, archive and file comments. The archive
|
|
parsing and non-compressed files are handled in pure Python code, for
|
|
compressed files, the "unrar" utility is run.
|
|
|
|
%package doc
|
|
Summary: RAR Archive Reader for Python (Documentation)
|
|
BuildArch: noarch
|
|
|
|
%description doc
|
|
Python module for RAR archive reading.
|
|
|
|
This package contains technical documentation.
|
|
|
|
%prep
|
|
%autosetup -p1 -n rarfile-%{version}
|
|
|
|
%build
|
|
%python_build
|
|
%make_build -C doc html
|
|
rm doc/_build/html/.buildinfo
|
|
|
|
%install
|
|
%python_install
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
%check
|
|
%pytest -k "not (test_unrar_tool or test_reading or test_rar3_header_encryption)"
|
|
|
|
%files %{python_files}
|
|
%license LICENSE
|
|
%pycache_only %{python_sitelib}/__pycache__/rarfile.*.py*
|
|
%{python_sitelib}/rarfile.py*
|
|
%{python_sitelib}/rarfile-%{version}-py%{python_version}.egg-info
|
|
|
|
%files %{python_files doc}
|
|
%license LICENSE
|
|
%doc doc/_build/html/
|
|
|
|
%changelog
|