From 308f366247de75aba5335590982757a5eb67427c88468e58fbe449dfd7758147 Mon Sep 17 00:00:00 2001 From: Thomas Bechtold Date: Fri, 31 Mar 2017 06:46:39 +0000 Subject: [PATCH] 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 --- python-rarfile.changes | 6 +++++ python-rarfile.spec | 55 ++++++++++++++++++------------------------ 2 files changed, 30 insertions(+), 31 deletions(-) diff --git a/python-rarfile.changes b/python-rarfile.changes index a35f5ba..39970fc 100644 --- a/python-rarfile.changes +++ b/python-rarfile.changes @@ -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 diff --git a/python-rarfile.spec b/python-rarfile.spec index 653d410..1fec49d 100644 --- a/python-rarfile.spec +++ b/python-rarfile.spec @@ -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