%global srcname neotime %global sum Nanosecond resolution temporal types %global desc %{sum} %global debug_package %{nil} Name: python-%{srcname} Version: 1.0.0 Release: 1%{?dist} Summary: %{sum} License: ASL 2.0 URL: https://pypi.python.org/pypi/%{srcname} Source0: https://files.pythonhosted.org/packages/source/n/%{srcname}/%{srcname}-%{version}.tar.gz BuildRequires: python2-devel BuildRequires: python2-setuptools %if 0%{?fedora} || 0%{?rhel} > 7 BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-setuptools %endif %description %{desc} %if 0%{?fedora} || 0%{?rhel} > 7 %package -n python%{python3_pkgversion}-%{srcname} Summary: %{sum} %{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}} Requires: python3-pytz Requires: python3-six %description -n python%{python3_pkgversion}-%{srcname} %{desc} %endif %package -n python2-%{srcname} Summary: %{sum} %if 0%{?fedora} || 0%{?rhel} > 7 Requires: python2-pytz Requires: python2-six %else Requires: pytz Requires: python-six %endif %{?python_provide:%python_provide python2-%{srcname}} %description -n python2-%{srcname} %{desc} %prep %autosetup -n %{srcname}-%{version} %build %py2_build %if 0%{?fedora} || 0%{?rhel} > 7 %py3_build %endif %install %py2_install %if 0%{?fedora} || 0%{?rhel} > 7 %py3_install %endif %files -n python2-%{srcname} %doc README.rst %{python2_sitelib}/* %if 0%{?fedora} || 0%{?rhel} > 7 %files -n python%{python3_pkgversion}-%{srcname} %doc README.rst %{python3_sitelib}/* %endif %changelog * Thu Jun 07 2018 mprahl - 1.0.0-1 - Initial release