2014-08-15 21:08:48 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-rarfile
|
|
|
|
#
|
2024-07-03 19:49:41 +00:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2014-08-15 21:08:48 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2019-09-21 19:22:54 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2014-08-15 21:08:48 +00:00
|
|
|
#
|
|
|
|
|
2016-04-26 14:22:10 +00:00
|
|
|
|
2020-07-20 08:38:53 +00:00
|
|
|
%define skip_python2 1
|
2014-08-15 21:08:48 +00:00
|
|
|
Name: python-rarfile
|
2024-07-03 19:49:41 +00:00
|
|
|
Version: 4.2
|
2014-08-15 21:08:48 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: RAR Archive Reader for Python
|
2016-04-26 14:22:10 +00:00
|
|
|
License: ISC
|
2019-09-21 19:22:54 +00:00
|
|
|
URL: https://rarfile.readthedocs.org/
|
|
|
|
Source0: https://files.pythonhosted.org/packages/source/r/rarfile/rarfile-%{version}.tar.gz
|
Accepting request 824106 from home:alois:branches:devel:languages:python
- Update to version 4.0
Main goals are:
* Increased zipfile-compatibility, thus also achieving
smaller difference between RAR3 and RAR5 archives.
* Removing dependency on unrar for extract, thus making
maintenance of alternative backends more manageable.
Breaking changes:
* Directory names will have "/" appended.
* RarFile.extract operates only on single entry, so when used
on directory it will create directory but not extract files
under it.
* RarFile.extract / RarFile.extractall / RarFile.testrar will
not launch special unrar command line, instead they are
implemented on top of RarFile.open.
* Keyword args in top-level APIs were renamed to match zipfile:
+ RarFile(rarfile) -> RarFile(file)
+ RarFile.setpassword(password) -> .setpassword(pwd)
+ RarFile.getinfo(fname) -> .getinfo(name)
+ RarFile.open(fname, mode, psw) -> .open(name, mode, pwd)
+ RarFile.read(fname, psw) -> .read(name, pwd)
* PATH_SEP cannot be changed from "/".
New features:
* RarFile.extract will return final sanitized filename
for target file.
* RarInfo.is_dir is now preferred spelling of isdir().
Old method kept as alias.
* New RarInfo.is_file and RarInfo.is_symlink
methods. Only one of ~RarInfo.is_file, ~RarInfo.is_dir or
~RarInfo.is_symlink can be True.
* RarFile.printdir has file argument for output.
* RarFile.__iter__ loops over RarInfo entries.
* RAR3: throw NeedFirstVolume exception with current volume
number, like RAR5 does.
* Nanosecond timestamp support. Visible as nsdatetime
instance.
* Minimal CLI when run as script: python3 -m rarfile
* Skip old file versions in versioned archive.
Cleanups:
* Use PBKDF2 implementation from hashlib.
* Improve test coverage.
version 3.3:
Fixes:
* Add the .sfx test files to MANIFEST.in for inclusion in pypi
tarball.
* Add all files in git to tarball.
- Run tests
- Switch to unar
OBS-URL: https://build.opensuse.org/request/show/824106
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rarfile?expand=0&rev=16
2020-08-06 05:39:42 +00:00
|
|
|
BuildRequires: %{python_module pytest}
|
2017-03-31 06:46:39 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2024-07-03 19:49:41 +00:00
|
|
|
BuildRequires: 7zip
|
Accepting request 824106 from home:alois:branches:devel:languages:python
- Update to version 4.0
Main goals are:
* Increased zipfile-compatibility, thus also achieving
smaller difference between RAR3 and RAR5 archives.
* Removing dependency on unrar for extract, thus making
maintenance of alternative backends more manageable.
Breaking changes:
* Directory names will have "/" appended.
* RarFile.extract operates only on single entry, so when used
on directory it will create directory but not extract files
under it.
* RarFile.extract / RarFile.extractall / RarFile.testrar will
not launch special unrar command line, instead they are
implemented on top of RarFile.open.
* Keyword args in top-level APIs were renamed to match zipfile:
+ RarFile(rarfile) -> RarFile(file)
+ RarFile.setpassword(password) -> .setpassword(pwd)
+ RarFile.getinfo(fname) -> .getinfo(name)
+ RarFile.open(fname, mode, psw) -> .open(name, mode, pwd)
+ RarFile.read(fname, psw) -> .read(name, pwd)
* PATH_SEP cannot be changed from "/".
New features:
* RarFile.extract will return final sanitized filename
for target file.
* RarInfo.is_dir is now preferred spelling of isdir().
Old method kept as alias.
* New RarInfo.is_file and RarInfo.is_symlink
methods. Only one of ~RarInfo.is_file, ~RarInfo.is_dir or
~RarInfo.is_symlink can be True.
* RarFile.printdir has file argument for output.
* RarFile.__iter__ loops over RarInfo entries.
* RAR3: throw NeedFirstVolume exception with current volume
number, like RAR5 does.
* Nanosecond timestamp support. Visible as nsdatetime
instance.
* Minimal CLI when run as script: python3 -m rarfile
* Skip old file versions in versioned archive.
Cleanups:
* Use PBKDF2 implementation from hashlib.
* Improve test coverage.
version 3.3:
Fixes:
* Add the .sfx test files to MANIFEST.in for inclusion in pypi
tarball.
* Add all files in git to tarball.
- Run tests
- Switch to unar
OBS-URL: https://build.opensuse.org/request/show/824106
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rarfile?expand=0&rev=16
2020-08-06 05:39:42 +00:00
|
|
|
BuildRequires: bsdtar
|
2017-03-31 06:46:39 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
|
|
|
BuildRequires: python3-Sphinx >= 1.3
|
2016-09-14 12:39:10 +00:00
|
|
|
Requires: bsdtar
|
Accepting request 824106 from home:alois:branches:devel:languages:python
- Update to version 4.0
Main goals are:
* Increased zipfile-compatibility, thus also achieving
smaller difference between RAR3 and RAR5 archives.
* Removing dependency on unrar for extract, thus making
maintenance of alternative backends more manageable.
Breaking changes:
* Directory names will have "/" appended.
* RarFile.extract operates only on single entry, so when used
on directory it will create directory but not extract files
under it.
* RarFile.extract / RarFile.extractall / RarFile.testrar will
not launch special unrar command line, instead they are
implemented on top of RarFile.open.
* Keyword args in top-level APIs were renamed to match zipfile:
+ RarFile(rarfile) -> RarFile(file)
+ RarFile.setpassword(password) -> .setpassword(pwd)
+ RarFile.getinfo(fname) -> .getinfo(name)
+ RarFile.open(fname, mode, psw) -> .open(name, mode, pwd)
+ RarFile.read(fname, psw) -> .read(name, pwd)
* PATH_SEP cannot be changed from "/".
New features:
* RarFile.extract will return final sanitized filename
for target file.
* RarInfo.is_dir is now preferred spelling of isdir().
Old method kept as alias.
* New RarInfo.is_file and RarInfo.is_symlink
methods. Only one of ~RarInfo.is_file, ~RarInfo.is_dir or
~RarInfo.is_symlink can be True.
* RarFile.printdir has file argument for output.
* RarFile.__iter__ loops over RarInfo entries.
* RAR3: throw NeedFirstVolume exception with current volume
number, like RAR5 does.
* Nanosecond timestamp support. Visible as nsdatetime
instance.
* Minimal CLI when run as script: python3 -m rarfile
* Skip old file versions in versioned archive.
Cleanups:
* Use PBKDF2 implementation from hashlib.
* Improve test coverage.
version 3.3:
Fixes:
* Add the .sfx test files to MANIFEST.in for inclusion in pypi
tarball.
* Add all files in git to tarball.
- Run tests
- Switch to unar
OBS-URL: https://build.opensuse.org/request/show/824106
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rarfile?expand=0&rev=16
2020-08-06 05:39:42 +00:00
|
|
|
Recommends: unar
|
2014-08-15 21:08:48 +00:00
|
|
|
BuildArch: noarch
|
2017-03-31 06:46:39 +00:00
|
|
|
%python_subpackages
|
2014-08-15 21:08:48 +00:00
|
|
|
|
|
|
|
%description
|
2017-03-31 06:46:39 +00:00
|
|
|
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.
|
2014-08-15 21:08:48 +00:00
|
|
|
|
|
|
|
%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
|
2024-07-03 19:49:41 +00:00
|
|
|
%autosetup -p1 -n rarfile-%{version}
|
2014-08-15 21:08:48 +00:00
|
|
|
|
|
|
|
%build
|
2017-03-31 06:46:39 +00:00
|
|
|
%python_build
|
2020-07-20 08:38:53 +00:00
|
|
|
%make_build -C doc html
|
2017-03-31 06:46:39 +00:00
|
|
|
rm doc/_build/html/.buildinfo
|
2014-08-15 21:08:48 +00:00
|
|
|
|
|
|
|
%install
|
2017-03-31 06:46:39 +00:00
|
|
|
%python_install
|
2019-10-14 14:40:16 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2014-08-15 21:08:48 +00:00
|
|
|
|
Accepting request 824106 from home:alois:branches:devel:languages:python
- Update to version 4.0
Main goals are:
* Increased zipfile-compatibility, thus also achieving
smaller difference between RAR3 and RAR5 archives.
* Removing dependency on unrar for extract, thus making
maintenance of alternative backends more manageable.
Breaking changes:
* Directory names will have "/" appended.
* RarFile.extract operates only on single entry, so when used
on directory it will create directory but not extract files
under it.
* RarFile.extract / RarFile.extractall / RarFile.testrar will
not launch special unrar command line, instead they are
implemented on top of RarFile.open.
* Keyword args in top-level APIs were renamed to match zipfile:
+ RarFile(rarfile) -> RarFile(file)
+ RarFile.setpassword(password) -> .setpassword(pwd)
+ RarFile.getinfo(fname) -> .getinfo(name)
+ RarFile.open(fname, mode, psw) -> .open(name, mode, pwd)
+ RarFile.read(fname, psw) -> .read(name, pwd)
* PATH_SEP cannot be changed from "/".
New features:
* RarFile.extract will return final sanitized filename
for target file.
* RarInfo.is_dir is now preferred spelling of isdir().
Old method kept as alias.
* New RarInfo.is_file and RarInfo.is_symlink
methods. Only one of ~RarInfo.is_file, ~RarInfo.is_dir or
~RarInfo.is_symlink can be True.
* RarFile.printdir has file argument for output.
* RarFile.__iter__ loops over RarInfo entries.
* RAR3: throw NeedFirstVolume exception with current volume
number, like RAR5 does.
* Nanosecond timestamp support. Visible as nsdatetime
instance.
* Minimal CLI when run as script: python3 -m rarfile
* Skip old file versions in versioned archive.
Cleanups:
* Use PBKDF2 implementation from hashlib.
* Improve test coverage.
version 3.3:
Fixes:
* Add the .sfx test files to MANIFEST.in for inclusion in pypi
tarball.
* Add all files in git to tarball.
- Run tests
- Switch to unar
OBS-URL: https://build.opensuse.org/request/show/824106
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rarfile?expand=0&rev=16
2020-08-06 05:39:42 +00:00
|
|
|
%check
|
2024-07-03 19:49:41 +00:00
|
|
|
%pytest -k "not (test_unrar_tool or test_reading or test_rar3_header_encryption)"
|
Accepting request 824106 from home:alois:branches:devel:languages:python
- Update to version 4.0
Main goals are:
* Increased zipfile-compatibility, thus also achieving
smaller difference between RAR3 and RAR5 archives.
* Removing dependency on unrar for extract, thus making
maintenance of alternative backends more manageable.
Breaking changes:
* Directory names will have "/" appended.
* RarFile.extract operates only on single entry, so when used
on directory it will create directory but not extract files
under it.
* RarFile.extract / RarFile.extractall / RarFile.testrar will
not launch special unrar command line, instead they are
implemented on top of RarFile.open.
* Keyword args in top-level APIs were renamed to match zipfile:
+ RarFile(rarfile) -> RarFile(file)
+ RarFile.setpassword(password) -> .setpassword(pwd)
+ RarFile.getinfo(fname) -> .getinfo(name)
+ RarFile.open(fname, mode, psw) -> .open(name, mode, pwd)
+ RarFile.read(fname, psw) -> .read(name, pwd)
* PATH_SEP cannot be changed from "/".
New features:
* RarFile.extract will return final sanitized filename
for target file.
* RarInfo.is_dir is now preferred spelling of isdir().
Old method kept as alias.
* New RarInfo.is_file and RarInfo.is_symlink
methods. Only one of ~RarInfo.is_file, ~RarInfo.is_dir or
~RarInfo.is_symlink can be True.
* RarFile.printdir has file argument for output.
* RarFile.__iter__ loops over RarInfo entries.
* RAR3: throw NeedFirstVolume exception with current volume
number, like RAR5 does.
* Nanosecond timestamp support. Visible as nsdatetime
instance.
* Minimal CLI when run as script: python3 -m rarfile
* Skip old file versions in versioned archive.
Cleanups:
* Use PBKDF2 implementation from hashlib.
* Improve test coverage.
version 3.3:
Fixes:
* Add the .sfx test files to MANIFEST.in for inclusion in pypi
tarball.
* Add all files in git to tarball.
- Run tests
- Switch to unar
OBS-URL: https://build.opensuse.org/request/show/824106
OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rarfile?expand=0&rev=16
2020-08-06 05:39:42 +00:00
|
|
|
|
2017-03-31 06:46:39 +00:00
|
|
|
%files %{python_files}
|
2019-09-21 19:22:54 +00:00
|
|
|
%license LICENSE
|
2017-03-31 06:46:39 +00:00
|
|
|
%pycache_only %{python_sitelib}/__pycache__/rarfile.*.py*
|
|
|
|
%{python_sitelib}/rarfile.py*
|
|
|
|
%{python_sitelib}/rarfile-%{version}-py%{python_version}.egg-info
|
2014-08-15 21:08:48 +00:00
|
|
|
|
2017-03-31 06:46:39 +00:00
|
|
|
%files %{python_files doc}
|
2019-09-21 19:22:54 +00:00
|
|
|
%license LICENSE
|
|
|
|
%doc doc/_build/html/
|
2014-08-15 21:08:48 +00:00
|
|
|
|
|
|
|
%changelog
|