%global module_name backports.lzma %{?filter_setup: %filter_provides_in %{python_sitearch}.*\.so$ %filter_setup } Name: python-backports-lzma Version: 0.0.2 Release: 8%{?dist} Summary: Backport of Python 3.3's lzma module License: BSD URL: https://github.com/peterjc/backports.lzma Source0: https://pypi.python.org/packages/source/b/%{module_name}/%{module_name}-%{version}.tar.gz Source1: https://raw.github.com/peterjc/backports.lzma/backports.lzma.v0.0.2/LICENSE Requires: python-backports BuildRequires: python2-devel BuildRequires: xz-devel BuildRequires: python-nose BuildRequires: python-test %description This is a backport of the "lzma" module included in Python 3.3 or later by Nadeem Vawda and Per Oyvind Karlsen, which provides a Python wrapper for XZ Utils (aka LZMA Utils v2) by Igor Pavlov. %prep %setup -qn %{module_name}-%{version} cp %{SOURCE1} ./ %build CFLAGS="%{optflags}" %{__python} setup.py build %install %{__python} setup.py install -O1 --skip-build --root %{buildroot} chmod 755 %{buildroot}%{python_sitearch}/backports/lzma/_lzma.so # This file is provided by python-backports rm %{buildroot}%{python_sitearch}/backports/__init__.py* %check cp build/lib*/backports/lzma/_lzma.so backports/lzma/ nosetests %files %doc LICENSE %{python_sitearch}/* %changelog * Tue Dec 16 2014 Lokesh Mandvekar - 0.0.2-8 - Resolves: rhbz#1158538 - delete __init__.py*, now provided by python-backports * Wed May 07 2014 Lokesh Mandvekar - 0.0.2-7 - do not delete __init__.py* because no python-backports package for RHEL-7 * Thu Apr 24 2014 Lokesh Mandvekar - 0.0.2-6 - Rebuilt for RHEL-7 * Tue Sep 17 2013 Ian Weller - 0.0.2-5 - Fix perms on _lzma.so, again * Tue Aug 20 2013 Ian Weller - 0.0.2-4 - Fix perms on _lzma.so - Add LICENSE from upstream * Tue Aug 20 2013 Ian Weller - 0.0.2-3 - Actually fix check section * Tue Aug 20 2013 Ian Weller - 0.0.2-2 - BR: python-backports * Mon Aug 19 2013 Ian Weller - 0.0.2-1 - Initial package build