%{!?python3_pkgversion:%global python3_pkgversion 3} %if 0%{?rhel} && 0%{?rhel} <= 7 %bcond_with python3 %else %bcond_without python3 %endif %global srcname setuptools_scm %global sum The blessed package to manage your versions by scm tags Name: python-%{srcname} Version: 1.15.0 Release: 1%{?dist} Summary: %{sum} License: MIT URL: http://pypi.python.org/pypi/%{srcname} Source0: http://pypi.python.org/packages/source/s/%{srcname}/%{srcname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools %if %{with python3} BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools %endif # with python3 %description Setuptools_scm handles managing your python package versions in scm metadata. It also handles file finders for the suppertes scms. %package -n python2-%{srcname} Summary: %{sum} Requires: python-setuptools >= 12 %{?python_provide:%python_provide python2-%{srcname}} Provides: python-%{srcname} %description -n python2-%{srcname} Setuptools_scm handles managing your python package versions in scm metadata. It also handles file finders for the suppertes scms. %if %{with python3} %package -n python%{python3_pkgversion}-%{srcname} Summary: %{sum} %{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} %description -n python%{python3_pkgversion}-%{srcname} Setuptools_scm handles managing your python package versions in scm metadata. It also handles file finders for the suppertes scms. %endif # with python3 %prep %autosetup -n %{srcname}-%{version} %build %{__python2} setup.py build %if %{with python3} %py3_build %endif # with python3 %install %{__python2} setup.py install -O1 --skip-build --root %{buildroot} %if %{with python3} %py3_install %endif # with python3 %files -n python2-%{srcname} %license LICENSE %doc CHANGELOG.rst README.rst %{python2_sitelib}/* %if %{with python3} %files -n python%{python3_pkgversion}-%{srcname} %license LICENSE %doc CHANGELOG.rst README.rst %{python3_sitelib}/* %endif # with python3 %changelog * Thu Dec 08 2016 Troy Dawson - 1.15.0-1 - Update to 1.15.0 - Build for RHEL, but require setuptools >= 12 * Mon Jan 4 2016 Orion Poplawski - 1.10.1-2 - No python2 package on EPEL (setuptools too old) * Thu Dec 17 2015 Orion Poplawski - 1.10.1-1 - Update to 1.10.1 * Wed Dec 2 2015 Orion Poplawski - 1.9.0-1 - Update to 1.9.0 * Tue Nov 10 2015 Fedora Release Engineering - 1.8.0-3 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 * Mon Oct 19 2015 Orion Poplawski - 1.8.0-2 - Cleanup stray .pyc files from tests * Sat Sep 19 2015 Orion Poplawski - 1.8.0-1 - Update to 1.8.0 - Fix license tag * Mon Sep 14 2015 Orion Poplawski - 1.7.0-1 - Initial package