%global scl python27 %scl_package %scl # Defaults for the values for the python27 Software Collection. These # will be used when python27-scldevel is not in the buildroot %{!?scl_python:%global scl_python python27} %{!?scl_prefix_python:%global scl_prefix_python %{scl_python}-} %{?scl:%scl_package python-versiontools} %{!?scl:%global pkg_name %{name}} %global pypi_name versiontools %define version 1.9.1 %define release 5 Name: %{?scl_prefix}python-versiontools Version: %{version} Release: %{release}%{?dist} Summary: Smart replacement for plain tuple used in __version__ License: LGPLv3 URL: https://launchpad.net/versiontools Source0: http://pypi.python.org/packages/source/v/versiontools/versiontools-1.9.1.tar.gz BuildArch: x86_64 #SCL BuildRequires: scl-utils-build BuildRequires: %{scl_prefix}scldevel BuildRequires: %{scl_prefix}build BuildRequires: %{scl_prefix}python-devel BuildRequires: %{scl_prefix}python-setuptools BuildRequires: python-sphinx BuildRequires: %{scl_prefix}python-nose %{?scl:BuildRequires: %{scl}-build %{scl}-runtime} %{?scl:Requires: %{scl}-runtime} %description Smart replacement for plain tuple used in __version__ %prep %setup -q -n %{pypi_name}-%{version} # remove bundled egg-info rm -rf %{pypi_name}.egg-info # generate html docs sphinx-build doc html # remove the sphinx-build leftovers rm -rf html/.{doctrees,buildinfo} %build %{?scl:scl enable %{scl} - << \EOF} export PYTHON='/opt/rh/python27/root/usr/bin/python' %{__python} setup.py build %{?scl:EOF} %install %scl_install %{?scl:scl enable %{scl} - << \EOF} export PYTHON='/opt/rh/python27/root/usr/bin/python' %{__python} setup.py install -O1 --skip-build --root %{buildroot} %{?scl:EOF} find %{buildroot} -name '*.la' -exec rm -f {} ';' rm -rf %{buildroot}/etc/rpm/macros.python27-config rm -rf %{buildroot}/etc/scl/prefixes/python27 rm -rf %{buildroot}/opt/rh/python27/root/usr/tmp rm -rf %{buildroot}/opt/rh/python27/root/var/mail %check %{?scl:scl enable %{scl} - << \EOF} export PYTHON='/opt/rh/python27/root/usr/bin/python' %{__python} setup.py nosetests %{?scl:EOF} %files %doc html %{python_sitelib}/%{pypi_name} %{python_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %changelog * Sat Mar 24 2018 Jean-Philipe Pialasse - 1.9.1-5.sme - x64 for python27 scl * Sat Jul 21 2012 Fedora Release Engineering - 1.9.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild * Fri May 04 2012 Bohuslav Kabrda - 1.9.1-2 - Be more explicit in %%files section. * Thu May 03 2012 Bohuslav Kabrda - 1.9.1-1 - Initial package.