From 1cbbbcba8e103bdc1959da9eea4726872325da0e Mon Sep 17 00:00:00 2001 From: yatin Date: Feb 07 2019 11:52:49 +0000 Subject: Bump to 0.3.27 and enable python2 build for CentOS <=7 --- diff --git a/.gitignore b/.gitignore index 7514892..4c050f3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /croniter-0.3.4.zip /croniter-0.3.19.tar.gz +/croniter-0.3.27.tar.gz diff --git a/python-croniter.spec b/python-croniter.spec index 32e0756..3782ef6 100644 --- a/python-croniter.spec +++ b/python-croniter.spec @@ -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 @@ URL: https://github.com/kiorky/croniter 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 @@ Summary: %{summary} 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 @@ rm -rf %{pypi_name}.egg-info 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 - 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 - 0.3.19-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/sources b/sources index c04ecad..b52b8e4 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (croniter-0.3.19.tar.gz) = 3942798f82cafe11a29fa5c28ac8079bd77bbfd19c56df5195ab26af46a135022b455fafc189d00768290ec4eb45854a671cfd1b86515f8de3168f450a9c4201 +SHA512 (croniter-0.3.27.tar.gz) = 0b17ff7ab3f1200a683a1e89a33a590b55f099e4fa48ad6279f4fe351557fafaa24ff1b0bc0d6c9e6e5127b5f33a9839b1cb2f96d2ff32bf941d83c938c28462