fbo / rpms / python-pecan

Forked from rpms/python-pecan 3 years ago
Clone
8e211b9
%global pypi_name pecan
112cd5f
%{!?_licensedir:%global license %%doc}
112cd5f
%{!?upstream_version: %global upstream_version %{version}%{?milestone}}
112cd5f
%if 0%{?fedora}
112cd5f
%global with_python3 1
112cd5f
%endif
8e211b9
8e211b9
Name:           python-%{pypi_name}
Alan Pevec b23a0c0
Version:        1.1.2
66dd999
Release:        3%{?dist}
8e211b9
Summary:        A lean WSGI object-dispatching web framework
8e211b9
8e211b9
License:        BSD
112cd5f
URL:            http://github.com/pecan/pecan
Alan Pevec b23a0c0
Source0:        https://pypi.io/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
8e211b9
BuildArch:      noarch
8e211b9
112cd5f
%description
112cd5f
A WSGI object-dispatching web framework, designed to be lean and
112cd5f
fast with few dependencies
112cd5f
112cd5f
%package -n python2-%{pypi_name}
112cd5f
Summary:        A lean WSGI object-dispatching web framework
112cd5f
%{?python_provide:%python_provide python2-%{pypi_name}}
112cd5f
# python_provide does not exist in CBS Cloud buildroot
ad7fcc8
Provides:       python-%{pypi_name} = %{version}-%{release}
ad7fcc8
Obsoletes:      python-%{pypi_name} < 1.0.2-2
112cd5f
8e211b9
BuildRequires:  python2-devel
8e211b9
BuildRequires:  python-setuptools
8e211b9
112cd5f
Requires:       python-webob
112cd5f
Requires:       python-simplegeneric
112cd5f
Requires:       python-mako
0936df7
Requires:       python-singledispatch
112cd5f
Requires:       python-webtest
8e211b9
Requires:       python-setuptools
d53b349
Requires:       python-logutils
112cd5f
Requires:       python-six
8e211b9
112cd5f
%description -n python2-%{pypi_name}
8e211b9
A WSGI object-dispatching web framework, designed to be lean and
8e211b9
fast with few dependencies
8e211b9
112cd5f
# python3 stuff
112cd5f
%if 0%{?with_python3}
112cd5f
%package -n python3-%{pypi_name}
112cd5f
Summary:        A lean WSGI object-dispatching web framework
112cd5f
%{?python_provide:%python_provide python3-%{pypi_name}}
112cd5f
112cd5f
BuildRequires:  python3-devel
112cd5f
BuildRequires:  python3-setuptools
112cd5f
112cd5f
Requires:       python3-webob
112cd5f
Requires:       python3-simplegeneric
112cd5f
Requires:       python3-mako
112cd5f
Requires:       python3-singledispatch
112cd5f
Requires:       python3-webtest
112cd5f
Requires:       python3-setuptools
112cd5f
Requires:       python3-logutils
112cd5f
Requires:       python3-six
112cd5f
112cd5f
%description -n python3-%{pypi_name}
112cd5f
A WSGI object-dispatching web framework, designed to be lean and
112cd5f
fast with few dependencies
112cd5f
%endif
8e211b9
8e211b9
%prep
8e211b9
%setup -q -n %{pypi_name}-%{version}
112cd5f
# Remove bundled egg-info
112cd5f
rm -rf %{pypi_name}.egg-info
8e211b9
8e211b9
%build
112cd5f
%{__python2} setup.py build
8e211b9
112cd5f
%if 0%{?with_python3}
112cd5f
%{__python3} setup.py build
112cd5f
%endif
8e211b9
8e211b9
%install
112cd5f
%if 0%{?with_python3}
112cd5f
%{__python3} setup.py install --skip-build --root %{buildroot}
2793ab7
mv %{buildroot}%{_bindir}/pecan %{buildroot}%{_bindir}/pecan-%{python3_version}
2793ab7
ln -s pecan-%{python3_version} %{buildroot}%{_bindir}/pecan-3
2793ab7
mv %{buildroot}%{_bindir}/gunicorn_pecan %{buildroot}%{_bindir}/gunicorn_pecan-%{python3_version}
2793ab7
ln -s gunicorn_pecan-%{python3_version} %{buildroot}%{_bindir}/gunicorn_pecan-3
112cd5f
%endif
112cd5f
2793ab7
%{__python2} setup.py install --skip-build --root %{buildroot}
2793ab7
mv %{buildroot}%{_bindir}/pecan %{buildroot}%{_bindir}/pecan-%{python2_version}
2793ab7
ln -s pecan-%{python2_version} %{buildroot}%{_bindir}/pecan-2
2793ab7
ln -s pecan-%{python2_version} %{buildroot}%{_bindir}/pecan
2793ab7
mv %{buildroot}%{_bindir}/gunicorn_pecan %{buildroot}%{_bindir}/gunicorn_pecan-%{python2_version}
2793ab7
ln -s gunicorn_pecan-%{python2_version} %{buildroot}%{_bindir}/gunicorn_pecan-2
2793ab7
ln -s gunicorn_pecan-%{python2_version} %{buildroot}%{_bindir}/gunicorn_pecan
2793ab7
112cd5f
%files -n python2-%{pypi_name}
112cd5f
%doc README.rst
112cd5f
%license LICENSE
112cd5f
%{_bindir}/pecan
112cd5f
%{_bindir}/gunicorn_pecan
2793ab7
%{_bindir}/pecan-2*
2793ab7
%{_bindir}/gunicorn_pecan-2*
112cd5f
%{python2_sitelib}/%{pypi_name}
112cd5f
%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
8e211b9
112cd5f
%if 0%{?with_python3}
112cd5f
%files -n python3-%{pypi_name}
112cd5f
%doc README.rst
112cd5f
%license LICENSE
2793ab7
%{_bindir}/pecan-3*
2793ab7
%{_bindir}/gunicorn_pecan-3*
112cd5f
%{python3_sitelib}/%{pypi_name}
112cd5f
%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info
112cd5f
%endif
8e211b9
8e211b9
%changelog
66dd999
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.1.2-3
66dd999
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
66dd999
e985a8b
* Mon Dec 19 2016 Miro Hrončok <mhroncok@redhat.com> - 1.1.2-2
e985a8b
- Rebuild for Python 3.6
e985a8b
Alan Pevec b23a0c0
* Tue Jul 19 2016 Alan Pevec <alan.pevec@redhat.com> 1.1.2-1
Alan Pevec b23a0c0
- Update to 1.1.2
Alan Pevec b23a0c0
8646b0a
* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.2-6
8646b0a
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages
8646b0a
5e42184
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.2-5
5e42184
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
5e42184
adafb13
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.2-4
adafb13
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5
adafb13
2793ab7
* Sat Nov  7 2015 Toshio Kuratomi <toshio@fedoraproject.org> - 1.0.2-3
2793ab7
- Fix the naming of python2 vs python3 versions of the scripts to comply with
2793ab7
  the python guidelines: https://fedoraproject.org/wiki/Packaging:Python#Naming
2793ab7
  This fixes several things:
2793ab7
  * The scripts in the python2-pecan package not working because they
2793ab7
    needed the python3-pecan libraries but there was no rpm dependency
2793ab7
  * The python2-pecan package requiring /usr/bin/python3
2793ab7
  * The python2-pecan package's scripts wouldn't have been able to serve
2793ab7
    web apps written in python2 because they were using python3 and would
2793ab7
    have failed to run pyhon2 scripts in their python3 process.
2793ab7
  * If those were fixed properly then the python-pecan and python3-pecan
2793ab7
    packages would have conflicted due to the scripts being different between
2793ab7
    the packages.
2793ab7
  Following the guidelines solves all of these problems.
2793ab7
ad7fcc8
* Sun Sep 06 2015 Matthias Runge <mrunge@redhat.com> - 1.0.2-2
ad7fcc8
- fix provides and obsoletes
ad7fcc8
112cd5f
* Fri Sep 04 2015 Chandan Kumar <chkumar246@gmail.com> - 1.0.2-1
112cd5f
- Added python2 and python3 subpackage
112cd5f
- Bumped to 1.0.2
112cd5f
d4bec29
* Thu Jun 18 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.8.3-2
d4bec29
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
d4bec29
d53b349
* Thu Mar 26 2015 Pádraig Brady <pbrady@redhat.com> - 0.8.3-1
d53b349
- Latest upstream
d53b349
8aef2b4
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.4.5-4
8aef2b4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
8aef2b4
d738b0f
* Sun Mar 23 2014 Pádraig Brady <pbrady@redhat.com> - 0.4.5-3
d738b0f
- Add missing dependency on python-logutils
d738b0f
0936df7
* Tue Mar 18 2014 Pádraig Brady <pbrady@redhat.com> - 0.4.5-2
0936df7
- Add missing dependency on python-singledispatch
0936df7
323bcc5
* Mon Mar 10 2014 Pádraig Brady <pbrady@redhat.com> - 0.4.5-1
323bcc5
- Latest upstream
323bcc5
2c1a608
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.2.1-6
2c1a608
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
2c1a608
Luke Macken 626d79b
* Fri Apr  5 2013 Luke Macken <lmacken@redhat.com> - 0.2.1-5
Luke Macken 626d79b
- Require python-webob >= 1.2 instead of python-webob1.2
Luke Macken 626d79b
8e211b9
* Thu Mar 14 2013 Padraig Brady <P@draigBrady.com> - 0.2.1-4
8e211b9
- Initial package.