#2 Bump to 0.3.27 and enable python2 build for CentOS <=7
Merged 5 years ago by apevec. Opened 5 years ago by ykarel.
rpms/ ykarel/python-croniter master  into  master

file modified
+1
@@ -1,2 +1,3 @@ 

  /croniter-0.3.4.zip

  /croniter-0.3.19.tar.gz

+ /croniter-0.3.27.tar.gz

file modified
+54 -2
@@ -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

  

file modified
+1 -1
@@ -1,1 +1,1 @@ 

- SHA512 (croniter-0.3.19.tar.gz) = 3942798f82cafe11a29fa5c28ac8079bd77bbfd19c56df5195ab26af46a135022b455fafc189d00768290ec4eb45854a671cfd1b86515f8de3168f450a9c4201

+ SHA512 (croniter-0.3.27.tar.gz) = 0b17ff7ab3f1200a683a1e89a33a590b55f099e4fa48ad6279f4fe351557fafaa24ff1b0bc0d6c9e6e5127b5f33a9839b1cb2f96d2ff32bf941d83c938c28462