| |
@@ -1,10 +1,17 @@
|
| |
# Created by pyp2rpm-3.2.3
|
| |
%global pypi_name croniter
|
| |
|
| |
+ %if 0%{?fedora} || 0%{?rhel} > 7
|
| |
+ %bcond_with python2
|
| |
+ %bcond_without python3
|
| |
+ %else
|
| |
+ %bcond_without python2
|
| |
+ %bcond_with python3
|
| |
+ %endif
|
| |
|
| |
Name: python-%{pypi_name}
|
| |
- Version: 0.3.19
|
| |
- Release: 6%{?dist}
|
| |
+ Version: 0.3.27
|
| |
+ Release: 1%{?dist}
|
| |
Summary: Iteration for datetime object with cron like format
|
| |
|
| |
License: MIT
|
| |
@@ -12,12 +19,30 @@
|
| |
Source0: https://files.pythonhosted.org/packages/source/c/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
|
| |
BuildArch: noarch
|
| |
|
| |
+ %if %{with python2}
|
| |
+ BuildRequires: python2-devel
|
| |
+ BuildRequires: python2-setuptools
|
| |
+ %endif
|
| |
+
|
| |
+ %if %{with python3}
|
| |
BuildRequires: python3-devel
|
| |
BuildRequires: python3-setuptools
|
| |
+ %endif
|
| |
|
| |
%description
|
| |
croniter provides iteration for the datetime object with a cron like format.
|
| |
|
| |
+ %if %{with python2}
|
| |
+ %package -n python2-%{pypi_name}
|
| |
+ Summary: %{summary}
|
| |
+ %{?python_provide:%python_provide python2-%{pypi_name}}
|
| |
+
|
| |
+ Requires: python2-dateutil
|
| |
+ %description -n python2-%{pypi_name}
|
| |
+ croniter provides iteration for the datetime object with a cron like format.
|
| |
+ %endif
|
| |
+
|
| |
+ %if %{with python3}
|
| |
%package -n python3-%{pypi_name}
|
| |
Summary: %{summary}
|
| |
%{?python_provide:%python_provide python3-%{pypi_name}}
|
| |
@@ -25,6 +50,7 @@
|
| |
Requires: python3-dateutil
|
| |
%description -n python3-%{pypi_name}
|
| |
croniter provides iteration for the datetime object with a cron like format.
|
| |
+ %endif
|
| |
|
| |
%prep
|
| |
%autosetup -p1 -n %{pypi_name}-%{version}
|
| |
@@ -36,21 +62,47 @@
|
| |
find -name \*.py -exec sed -i '/\/usr\/bin\/env python/{d;q}' {} +
|
| |
|
| |
%build
|
| |
+ %if %{with python2}
|
| |
+ %py2_build
|
| |
+ %endif
|
| |
+ %if %{with python3}
|
| |
%py3_build
|
| |
+ %endif
|
| |
|
| |
%install
|
| |
# Must do the subpackages' install first because the scripts in /usr/bin are
|
| |
# overwritten with every setup.py install.
|
| |
+ %if %{with python3}
|
| |
%py3_install
|
| |
+ %endif
|
| |
+
|
| |
+ %if %{with python2}
|
| |
+ %py2_install
|
| |
+ %endif
|
| |
|
| |
+ %if %{with python2}
|
| |
+ %files -n python2-%{pypi_name}
|
| |
+ %license docs/LICENSE
|
| |
+ %doc README.rst
|
| |
+
|
| |
+ %{python2_sitelib}/%{pypi_name}
|
| |
+ %{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
|
| |
+ %endif
|
| |
+
|
| |
+ %if %{with python3}
|
| |
%files -n python3-%{pypi_name}
|
| |
%license docs/LICENSE
|
| |
%doc README.rst
|
| |
|
| |
%{python3_sitelib}/%{pypi_name}
|
| |
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
|
| |
+ %endif
|
| |
|
| |
%changelog
|
| |
+ * Thu Feb 07 2019 Yatin Karel <ykarel@redhat.com> - 0.3.27-1
|
| |
+ - Bump to 0.3.27
|
| |
+ - Add conditionals to build python2 subpackage in CentOS <=7
|
| |
+
|
| |
* Sat Feb 02 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.19-6
|
| |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
| |
|
| |