%global pypi_name pecan %{!?_licensedir:%global license %%doc} %{!?upstream_version: %global upstream_version %{version}%{?milestone}} %if 0%{?fedora} || 0%{?rhel} > 7 %global with_python3 1 %global with_python2 0 %endif Name: python-%{pypi_name} Version: 1.3.2 Release: 3%{?dist} Summary: A lean WSGI object-dispatching web framework License: BSD URL: http://github.com/pecan/pecan Source0: https://pypi.io/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch %description A WSGI object-dispatching web framework, designed to be lean and fast with few dependencies %if 0%{?with_python2} %package -n python2-%{pypi_name} Summary: A lean WSGI object-dispatching web framework %{?python_provide:%python_provide python2-%{pypi_name}} # python_provide does not exist in CBS Cloud buildroot Provides: python-%{pypi_name} = %{version}-%{release} Obsoletes: python-%{pypi_name} < 1.0.2-2 BuildRequires: python2-devel BuildRequires: python2-setuptools Requires: python2-webob Requires: python-simplegeneric Requires: python2-mako Requires: python2-singledispatch Requires: python2-webtest Requires: python2-setuptools Requires: python2-logutils Requires: python2-six %description -n python2-%{pypi_name} A WSGI object-dispatching web framework, designed to be lean and fast with few dependencies %endif # python3 stuff %if 0%{?with_python3} %package -n python3-%{pypi_name} Summary: A lean WSGI object-dispatching web framework %{?python_provide:%python_provide python3-%{pypi_name}} BuildRequires: python3-devel BuildRequires: python3-setuptools Requires: python3-webob Requires: python3-simplegeneric Requires: python3-mako Requires: python3-webtest Requires: python3-setuptools Requires: python3-logutils Requires: python3-six %description -n python3-%{pypi_name} A WSGI object-dispatching web framework, designed to be lean and fast with few dependencies %endif %prep %setup -q -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info %build %if 0%{?with_python2} %{__python2} setup.py build %endif %if 0%{?with_python3} %{__python3} setup.py build %endif %install %if 0%{?with_python3} %{__python3} setup.py install --skip-build --root %{buildroot} mv %{buildroot}%{_bindir}/pecan %{buildroot}%{_bindir}/pecan-%{python3_version} ln -s pecan-%{python3_version} %{buildroot}%{_bindir}/pecan-3 mv %{buildroot}%{_bindir}/gunicorn_pecan %{buildroot}%{_bindir}/gunicorn_pecan-%{python3_version} ln -s gunicorn_pecan-%{python3_version} %{buildroot}%{_bindir}/gunicorn_pecan-3 %endif %if 0%{?with_python2} %{__python2} setup.py install --skip-build --root %{buildroot} mv %{buildroot}%{_bindir}/pecan %{buildroot}%{_bindir}/pecan-%{python2_version} ln -s pecan-%{python2_version} %{buildroot}%{_bindir}/pecan-2 ln -s pecan-%{python2_version} %{buildroot}%{_bindir}/pecan mv %{buildroot}%{_bindir}/gunicorn_pecan %{buildroot}%{_bindir}/gunicorn_pecan-%{python2_version} ln -s gunicorn_pecan-%{python2_version} %{buildroot}%{_bindir}/gunicorn_pecan-2 ln -s gunicorn_pecan-%{python2_version} %{buildroot}%{_bindir}/gunicorn_pecan %files -n python2-%{pypi_name} %doc README.rst %license LICENSE %{_bindir}/pecan %{_bindir}/gunicorn_pecan %{_bindir}/pecan-2* %{_bindir}/gunicorn_pecan-2* %{python2_sitelib}/%{pypi_name} %{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %endif %if 0%{?with_python3} %files -n python3-%{pypi_name} %doc README.rst %license LICENSE %{_bindir}/pecan-3* %{_bindir}/gunicorn_pecan-3* %{python3_sitelib}/%{pypi_name} %{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info %endif %changelog * Fri Jan 18 2019 Javier Peña - 1.3.2-3 - Remove python3-singledispatch req, not needed since Python 3.4 * Wed Jan 16 2019 Shreshtha Joshi - 1.3.2-2 - RHEL8-isms * Fri Jun 01 2018 Alfredo Moralejo - 1.3.2-1 - Update to 1.3.2 release. It adds support for webob >= 1.8.0. * Fri Feb 09 2018 Iryna Shcherbina - 1.2.1-3 - Update Python 2 dependency declarations to new packaging standards (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) * Fri Feb 09 2018 Fedora Release Engineering - 1.2.1-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild * Mon Oct 23 2017 Alan Pevec 1.2.1-1 - Update to 1.2.1 * Thu Jul 27 2017 Fedora Release Engineering - 1.1.2-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild * Sat Feb 11 2017 Fedora Release Engineering - 1.1.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild * Mon Dec 19 2016 Miro Hrončok - 1.1.2-2 - Rebuild for Python 3.6 * Tue Jul 19 2016 Alan Pevec 1.1.2-1 - Update to 1.1.2 * Tue Jul 19 2016 Fedora Release Engineering - 1.0.2-6 - https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages * Thu Feb 04 2016 Fedora Release Engineering - 1.0.2-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild * Tue Nov 10 2015 Fedora Release Engineering - 1.0.2-4 - Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5 * Sat Nov 7 2015 Toshio Kuratomi - 1.0.2-3 - Fix the naming of python2 vs python3 versions of the scripts to comply with the python guidelines: https://fedoraproject.org/wiki/Packaging:Python#Naming This fixes several things: * The scripts in the python2-pecan package not working because they needed the python3-pecan libraries but there was no rpm dependency * The python2-pecan package requiring /usr/bin/python3 * The python2-pecan package's scripts wouldn't have been able to serve web apps written in python2 because they were using python3 and would have failed to run pyhon2 scripts in their python3 process. * If those were fixed properly then the python-pecan and python3-pecan packages would have conflicted due to the scripts being different between the packages. Following the guidelines solves all of these problems. * Sun Sep 06 2015 Matthias Runge - 1.0.2-2 - fix provides and obsoletes * Fri Sep 04 2015 Chandan Kumar - 1.0.2-1 - Added python2 and python3 subpackage - Bumped to 1.0.2 * Thu Jun 18 2015 Fedora Release Engineering - 0.8.3-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild * Thu Mar 26 2015 Pádraig Brady - 0.8.3-1 - Latest upstream * Sat Jun 07 2014 Fedora Release Engineering - 0.4.5-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild * Sun Mar 23 2014 Pádraig Brady - 0.4.5-3 - Add missing dependency on python-logutils * Tue Mar 18 2014 Pádraig Brady - 0.4.5-2 - Add missing dependency on python-singledispatch * Mon Mar 10 2014 Pádraig Brady - 0.4.5-1 - Latest upstream * Sun Aug 04 2013 Fedora Release Engineering - 0.2.1-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild * Fri Apr 5 2013 Luke Macken - 0.2.1-5 - Require python-webob >= 1.2 instead of python-webob1.2 * Thu Mar 14 2013 Padraig Brady - 0.2.1-4 - Initial package.