14
0
Files
python-rarfile/python-rarfile.spec

86 lines
2.5 KiB
RPMSpec
Raw Normal View History

#
# spec file for package python-rarfile
#
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# 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 http://bugs.opensuse.org/
#
Name: python-rarfile
Version: 2.6
Release: 0
License: ISC
Summary: RAR Archive Reader for Python
Url: https://rarfile.readthedocs.org/
Group: Development/Languages/Python
Source0: http://pypi.python.org/packages/source/r/rarfile/rarfile-%{version}.tar.gz
BuildRequires: python-setuptools
BuildRequires: python-Sphinx
Requires: 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
%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.
%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.
This package contains technical documentation.
%prep
%setup -qn rarfile-%{version}
%build
python setup.py build
make html
%install
python setup.py install --root=%{buildroot} --prefix=%{_prefix}
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
%defattr(-,root,root,-)
%doc LICENSE
%{python_sitelib}/*
%files doc
%defattr(-,root,root,-)
%doc %{_docdir}/%{name}-doc
%changelog