%{!?python3_pkgversion:%global python3_pkgversion 3} %bcond_without tests # EL7 does not have a new enough python-setuptools %if 0%{?rhel} && 0%{?rhel} <= 7 %bcond_with python2 %bcond_with python3 %bcond_with platform_python %else %bcond_without python2 %bcond_without python3 %bcond_without platform_python %endif %global srcname setuptools_scm %global sum The blessed package to manage your versions by scm tags Name: python-%{srcname} Version: 1.15.6 Release: 5%{?dist} Summary: %{sum} License: MIT URL: https://pypi.python.org/pypi/%{srcname} Source0: https://files.pythonhosted.org/packages/source/s/%{srcname}/%{srcname}-%{version}.tar.gz BuildArch: noarch %if %{with python2} BuildRequires: python2-devel BuildRequires: python2-setuptools %endif %if %{with python3} BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools %endif %if %{with platform_python} BuildRequires: platform-python-devel BuildRequires: platform-python-setuptools %endif # For tests %if %{with tests} %if %{with python2} BuildRequires: pytest %endif %if %{with python3} BuildRequires: python%{python3_pkgversion}-pytest %endif %if %{with platform_python} BuildRequires: platform-python-pytest %endif BuildRequires: git-core BuildRequires: mercurial %endif %description Setuptools_scm handles managing your python package versions in scm metadata. It also handles file finders for the suppertes scms. %if %{with python2} %package -n python2-%{srcname} Summary: %{sum} %{?python_provide:%python_provide python2-%{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. %endif %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 %if %{with platform_python} %package -n platform-python-%{srcname} Summary: %{sum} %description -n platform-python-%{srcname} Setuptools_scm handles managing your python package versions in scm metadata. It also handles file finders for the suppertes scms. %endif %prep %autosetup -n %{srcname}-%{version} %build %if %{with python2} %py2_build %endif %if %{with python3} %py3_build %endif %if %{with platform_python} %platform_py_build %endif # with platform_python %install %if %{with python2} %py2_install %endif %if %{with python3} %py3_install %endif %if %{with platform_python} %platform_py_install %endif # with platform_python %if %{with tests} %check %if %{with python2} PYTHONPATH=%{buildroot}%{python2_sitelib} py.test-%{python2_version} -vv %endif %if %{with python3} PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} -vv %endif %if %{with platform_python} PYTHONPATH=%{buildroot}%{platform_python_sitelib} py.test-%{platform_python_version} -vv %endif # with platform_python %endif # with tests %if %{with python2} %files -n python2-%{srcname} %license LICENSE %doc CHANGELOG.rst README.rst %{python2_sitelib}/* %endif %if %{with python3} %files -n python%{python3_pkgversion}-%{srcname} %license LICENSE %doc CHANGELOG.rst README.rst %{python3_sitelib}/%{srcname}/ %{python3_sitelib}/%{srcname}-*.egg-info %endif %if %{with platform_python} %files -n platform-python-%{srcname} %license LICENSE %doc CHANGELOG.rst README.rst %{platform_python_sitelib}/%{srcname}/ %{platform_python_sitelib}/%{srcname}-*.egg-info %endif %changelog * Thu Aug 24 2017 Miro Hrončok - 1.15.6-5 - Rebuilt for rhbz#1484607 * Sun Aug 20 2017 Tomas Orsava - 1.15.6-4 - Re-enable tests to finish bootstrapping the platform-python stack (https://fedoraproject.org/wiki/Changes/Platform_Python_Stack) * Thu Aug 10 2017 Lumír Balhar - 1.15.6-3 - Add subpackage for platform-python - Disable tests so platform-python stack can be bootstrapped (https://fedoraproject.org/wiki/Changes/Platform_Python_Stack) * Thu Jul 27 2017 Fedora Release Engineering - 1.15.6-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Thu Jun 15 2017 Orion Poplawski - 1.15.6-1 - Update to 1.15.6 * Mon Apr 10 2017 Orion Poplawski - 1.15.5-1 - Update to 1.15.5 * Sat Feb 11 2017 Fedora Release Engineering - 1.15.0-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Sat Feb 04 2017 Kevin Fenzi - 1.15.0-1 - Update to 1.15.0 * Tue Dec 13 2016 Stratakis Charalampos - 1.13.0-2 - Rebuild for Python 3.6 * Mon Oct 10 2016 Parag Nemade - 1.13.0-1 - Update to 1.13.0 * Tue Jul 19 2016 Fedora Release Engineering - 1.10.1-4 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Thu Feb 04 2016 Fedora Release Engineering - 1.10.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * 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