diff --git a/neotime-1.7.4.tar.gz b/neotime-1.7.4.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..69a5c7f215ceb9a7578d6e1e3347713bdf387c54 Binary files /dev/null and b/neotime-1.7.4.tar.gz differ diff --git a/neotime.spec b/neotime.spec new file mode 100644 index 0000000000000000000000000000000000000000..9fe9d27c7dcfc351a3898f081a5b74fb7fd9865d --- /dev/null +++ b/neotime.spec @@ -0,0 +1,80 @@ +%global srcname neotime +%global sum Nanosecond resolution temporal types +%global desc %{sum} +%global debug_package %{nil} + +Name: python-%{srcname} +Version: 1.7.4 +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 + +BuildArch: noarch +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} +find ./ -name '*.py' -exec sed -i '/^#!\/usr\/bin\/env python$/d' '{}' ';' + +%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