forked from pool/python-rarfile
Accepting request 483440 from home:alois:branches:devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/483440 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-rarfile?expand=0&rev=6
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 29 17:01:35 UTC 2017 - aloisio@gmx.com
|
||||
|
||||
- Converted to single-spec
|
||||
- Improved description
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Feb 3 16:00:52 UTC 2017 - aloisio@gmx.com
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
||||
Name: python-rarfile
|
||||
Version: 3.0
|
||||
Release: 0
|
||||
@@ -24,36 +25,27 @@ License: ISC
|
||||
Group: Development/Languages/Python
|
||||
Url: https://rarfile.readthedocs.org/
|
||||
Source0: https://pypi.io/packages/source/r/rarfile/rarfile-%{version}.tar.gz
|
||||
BuildRequires: python-Sphinx
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: %{python_module setuptools}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
BuildRequires: python3-Sphinx >= 1.3
|
||||
Requires: bsdtar
|
||||
Recommends: unrar
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%if 0%{?suse_version} <= 1110
|
||||
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
|
||||
%else
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
%python_subpackages
|
||||
|
||||
%description
|
||||
This is Python module for RAR archive reading.
|
||||
|
||||
Features:
|
||||
- Supports both RAR 2.x and 3.x archives.
|
||||
- Supports multi volume archives.
|
||||
- Supports Unicode filenames.
|
||||
- Supports password-protected archives.
|
||||
- Supports archive and file comments.
|
||||
- Archive parsing and non-compressed files are handled in pure Python
|
||||
code.
|
||||
- For compressed files runs 'unrar' utility.
|
||||
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)
|
||||
Group: Documentation/HTML
|
||||
%if 0%{?suse_version} > 1110
|
||||
BuildArch: noarch
|
||||
%endif
|
||||
|
||||
%description doc
|
||||
Python module for RAR archive reading.
|
||||
@@ -61,26 +53,27 @@ Python module for RAR archive reading.
|
||||
This package contains technical documentation.
|
||||
|
||||
%prep
|
||||
%setup -qn rarfile-%{version}
|
||||
%setup -q -n rarfile-%{version}
|
||||
|
||||
%build
|
||||
python setup.py build
|
||||
make -C doc html
|
||||
%python_build
|
||||
make %{?_smp_mflags} -C doc html
|
||||
rm doc/_build/html/.buildinfo
|
||||
sed -i 's/\r$//' doc/_build/html/objects.inv
|
||||
|
||||
%install
|
||||
python setup.py install --root=%{buildroot} --prefix=%{_prefix}
|
||||
%python_install
|
||||
%python_expand %fdupes -s %{buildroot}%{$python_sitelib}
|
||||
|
||||
install -dm 0755 %{buildroot}%{_docdir}/%{name}-doc/_static
|
||||
install -m 0644 doc/_build/html/{*.html,*.js} %{buildroot}%{_docdir}/%{name}-doc
|
||||
install -m 0644 doc/_build/html/_static/* %{buildroot}%{_docdir}/%{name}-doc/_static
|
||||
|
||||
%files
|
||||
%files %{python_files}
|
||||
%defattr(-,root,root,-)
|
||||
%doc LICENSE
|
||||
%{python_sitelib}/*
|
||||
%pycache_only %{python_sitelib}/__pycache__/rarfile.*.py*
|
||||
%{python_sitelib}/rarfile.py*
|
||||
%{python_sitelib}/rarfile-%{version}-py%{python_version}.egg-info
|
||||
|
||||
%files doc
|
||||
%files %{python_files doc}
|
||||
%defattr(-,root,root,-)
|
||||
%doc %{_docdir}/%{name}-doc
|
||||
%doc LICENSE doc/_build/html/
|
||||
|
||||
%changelog
|
||||
|
||||
Reference in New Issue
Block a user