%if 0%{?fedora}
%global with_python3 1
%endif
%global modname pyramid
Name: python-%{modname}
Version: 1.5.6
Release: 3%{?dist}
Summary: The Pyramid web application framework, a Pylons project
Group: Development/Libraries
License: BSD
URL: http://pylonsproject.com
Source0: http://pypi.python.org/packages/source/p/pyramid/%{modname}-%{version}.tar.gz
BuildArch: noarch
BuildRequires: python2-devel
BuildRequires: python-setuptools
BuildRequires: python-docutils
BuildRequires: python-sphinx
BuildRequires: python-chameleon >= 1.2.3
BuildRequires: python-setuptools
BuildRequires: python-zope-component >= 3.6.0
BuildRequires: python-translationstring
BuildRequires: python-venusian >= 1.0
BuildRequires: python-repoze-lru
BuildRequires: python-zope-configuration
BuildRequires: python-zope-deprecation >= 3.5.0
Requires: python-chameleon >= 1.2.3
Requires: python-setuptools
Requires: python-zope-component >= 3.6.0
Requires: python-translationstring
Requires: python-venusian >= 1.0
Requires: python-repoze-lru
Requires: python-zope-configuration
Requires: python-zope-deprecation >= 3.5.0
%if 0%{?fedora} && 0%{?fedora} >= 19
BuildRequires: python-webob >= 1.2
Requires: python-webob >= 1.2
%else
BuildRequires: python-webob1.4
Requires: python-webob1.4
%endif
BuildRequires: python-webtest
BuildRequires: python-mako >= 0.3.6
Requires: python-mako >= 0.3.6
BuildRequires: python-zope-interface >= 3.8.0
Requires: python-zope-interface >= 3.8.0
BuildRequires: python-paste-deploy >= 1.5.0
Requires: python-paste-deploy >= 1.5.0
%if 0%{?with_python3}
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-docutils
BuildRequires: python3-sphinx
BuildRequires: python3-chameleon >= 1.2.3
BuildRequires: python3-setuptools
BuildRequires: python3-zope-component >= 3.6.0
BuildRequires: python3-translationstring
BuildRequires: python3-venusian >= 1.0
BuildRequires: python3-repoze-lru
BuildRequires: python3-zope-configuration
BuildRequires: python3-zope-deprecation >= 3.5.0
BuildRequires: python3-webtest
BuildRequires: python3-mako
BuildRequires: python3-zope-interface
BuildRequires: python3-paste-deploy
%if 0%{?fedora} && 0%{?fedora} >= 19
BuildRequires: python3-webob >= 1.2
%else
BuildRequires: python3-webob1.2
%endif
%endif
%description
Pyramid is a small, fast, down-to-earth, open source Python web development
framework. It makes real-world web application development and deployment more
fun, more predictable, and more productive.
%if 0%{?with_python3}
%package -n python3-pyramid
Summary: The Pyramid web application framework, a Pylons project
Group: Development/Libraries
Requires: python3-chameleon >= 1.2.3
Requires: python3-setuptools
Requires: python3-zope-component >= 3.6.0
Requires: python3-translationstring
Requires: python3-venusian >= 1.0
Requires: python3-repoze-lru
Requires: python3-zope-configuration
Requires: python3-zope-deprecation >= 3.5.0
Requires: python3-mako >= 0.3.6
Requires: python3-zope-interface >= 3.8.0
Requires: python3-paste-deploy >= 1.5.0
%if 0%{?fedora} && 0%{?fedora} >= 19
Requires: python3-webob >= 1.2
%else
Requires: python3-webob1.2
%endif
%description -n python3-pyramid
Pyramid is a small, fast, down-to-earth, open source Python web development
framework. It makes real-world web application development and deployment more
fun, more predictable, and more productive.
%endif
%prep
%setup -q -n pyramid-%{version}
# Force that a certain version of webob is imported and not the older one.
awk 'NR==1{print "import __main__; __main__.__requires__ = __requires__ = [\"WebOb>=1.3.1\"]; import pkg_resources"}1' setup.py > setup.py.tmp
mv setup.py.tmp setup.py
awk 'NR==1{print "import __main__; __main__.__requires__ = __requires__ = [\"WebOb>=1.3.1\"]; import pkg_resources"}1' pyramid/__init__.py > pyramid/__init__.py.tmp
mv pyramid/__init__.py.tmp pyramid/__init__.py
# Remove bundled egg info
rm -rf %{modname}.egg-info
%if 0%{?with_python3}
rm -rf %{py3dir}
cp -a . %{py3dir}
%endif
%build
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py build
popd
%endif
%{__python} setup.py build
%install
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py install --skip-build --root=%{buildroot}
cp -r pyramid/scaffolds/alchemy %{buildroot}/%{python3_sitelib}/pyramid/scaffolds/.
cp -r pyramid/scaffolds/starter %{buildroot}/%{python3_sitelib}/pyramid/scaffolds/.
cp -r pyramid/scaffolds/zodb %{buildroot}/%{python3_sitelib}/pyramid/scaffolds/.
mv %{buildroot}/%{_bindir}/pcreate %{buildroot}/%{_bindir}/python3-pcreate
mv %{buildroot}/%{_bindir}/pserve %{buildroot}/%{_bindir}/python3-pserve
mv %{buildroot}/%{_bindir}/prequest %{buildroot}/%{_bindir}/python3-prequest
mv %{buildroot}/%{_bindir}/proutes %{buildroot}/%{_bindir}/python3-proutes
mv %{buildroot}/%{_bindir}/pshell %{buildroot}/%{_bindir}/python3-pshell
mv %{buildroot}/%{_bindir}/ptweens %{buildroot}/%{_bindir}/python3-ptweens
mv %{buildroot}/%{_bindir}/pviews %{buildroot}/%{_bindir}/python3-pviews
mv %{buildroot}/%{_bindir}/pdistreport %{buildroot}/%{_bindir}/python3-pdistreport
popd
%endif
%{__python} setup.py install -O1 --skip-build --root %{buildroot}
cp -r pyramid/scaffolds/alchemy %{buildroot}/%{python_sitelib}/pyramid/scaffolds/.
cp -r pyramid/scaffolds/starter %{buildroot}/%{python_sitelib}/pyramid/scaffolds/.
cp -r pyramid/scaffolds/zodb %{buildroot}/%{python_sitelib}/pyramid/scaffolds/.
%check
%if 0%{?with_python3}
pushd %{py3dir}
%{__python3} setup.py test
popd
%endif
%if 0%{?rhel} && 0%{?rhel} <= 6
# Tests on el6 fail for unknown reasons.
%else
%{__python} setup.py test
%endif
%files
%doc README.rst LICENSE.txt
%{python_sitelib}/%{modname}/
%{python_sitelib}/%{modname}-%{version}*.egg-info
%{_bindir}/pcreate
%{_bindir}/pserve
%{_bindir}/prequest
%{_bindir}/proutes
%{_bindir}/pshell
%{_bindir}/ptweens
%{_bindir}/pviews
%{_bindir}/pdistreport
%if 0%{?with_python3}
%files -n python3-pyramid
%doc README.rst LICENSE.txt
%{python3_sitelib}/%{modname}/
%{python3_sitelib}/%{modname}-%{version}*.egg-info
%{_bindir}/python3-pcreate
%{_bindir}/python3-pserve
%{_bindir}/python3-prequest
%{_bindir}/python3-proutes
%{_bindir}/python3-pshell
%{_bindir}/python3-ptweens
%{_bindir}/python3-pviews
%{_bindir}/python3-pdistreport
%endif
%changelog
* Fri Feb 03 2017 Randy Barlow <bowlofeggs@fedoraproject.org> - 1.5.6-3
- Use Ralph's webob technique in the package's main __init__.py so it
works during runtime as well (#1419160).
* Thu Apr 16 2015 Ralph Bean <rbean@redhat.com> - 1.5.6-2
- Force usage of the forward compat webob package on epel7.
* Wed Apr 15 2015 Ralph Bean <rbean@redhat.com> - 1.5.6-1
- new version
* Wed Apr 15 2015 Ralph Bean <rbean@redhat.com> - 1.5.1-2
- Upstream epel7 to 1.5.1.
* Fri Nov 07 2014 Ralph Bean <rbean@redhat.com> - 1.4.6-1
- Upstream 1.4.6 for epel7.
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-13
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Thu May 29 2014 Bohuslav Kabrda <bkabrda@redhat.com> - 1.4-12
- Rebuilt for https://fedoraproject.org/wiki/Changes/Python_3.4
* Fri Dec 06 2013 Pierre-Yves Chibon <pingou@pingoured>fr - 1.4-11
- Change BR from python-setuptools-devel to python-setuptools
See https://fedoraproject.org/wiki/Changes/Remove_Python-setuptools-devel
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Tue Apr 16 2013 Ralph Bean <rbean@redhat.com> - 1.4-9
- Make python-webob dependency contingent on f19.
* Tue Apr 16 2013 Ralph Bean <rbean@redhat.com> - 1.4-8
- Explicitly copy scaffolds into buildroot.
- More explicit file ownership.
* Fri Apr 5 2013 Luke Macken <lmacken@redhat.com> - 1.4-7
- Require python-webob >= 1.2 instead of the python-webob1.2 package
* Wed Feb 27 2013 Ralph Bean <rbean@redhat.com> - 1.4-6
- Reenabled the python3 subpackage.
- Correctly prefixed python3 executables.
- Remove egg-info in prep, not after build.
* Fri Feb 22 2013 Ralph Bean <rbean@redhat.com> - 1.4-5
- Manually disabled python3 subpackage; waiting on deps.
- Loosened constraint on python-webob version.
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.4-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Wed Jan 16 2013 Ralph Bean <rbean@redhat.com> - 1.4-3
- Packaged python3 subpackage.
- Removed unnecessary Buildroot tag.
- Removed requirement on python-virtualenv.
- Removed requirement on python-paste.
* Mon Dec 31 2012 Ralph Bean <rbean@redhat.com> - 1.4-2
- Add zope.interface to the setuptools hack for el6.
- Add dep on python-unittest2 for el6.
- Add dep on python-ordereddict for el6.
- Remove bundled egg-info
- More specific directory listing in python_sitelib.
- Disable tests for el6. Unexplained failure.
* Wed Dec 19 2012 Ralph Bean <rbean@redhat.com> - 1.4-1
- Latest upstream.
* Mon Dec 10 2012 Ralph Bean <rbean@redhat.com> - 1.4b3-1
- Latest upstream. 1.4b2-1 was a brownbag release.
* Mon Dec 10 2012 Ralph Bean <rbean@redhat.com> - 1.4b2-1
- Latest upstream.
* Wed Nov 28 2012 Ralph Bean <rbean@redhat.com> - 1.4b1-1
- Latest upstream.
- Removed unnecessary defattr and clean section.
- Re-enabled test suite/check section.
- Removed old patch.
- Depend on and force python-webob1.2
- A bunch of new _bindir tools.
* Wed Oct 10 2012 Tomas Dabasinskas <tomas@redhat.com> - 1.2.7-6
- Changed python-mako requires.
For rhel python-mako0.4, else python-mako >= 0.3.6
* Thu Sep 26 2012 Tomas Dabasinskas <tomas@redhat.com> - 1.2.7-5
- Added patch to change install requires from python-paste-script >= 1.7.4
to python-paste-script >= 1.7.3, python-paste-script is provided by Red Hat
patch applied if running on rhel
- Added version numbers for required packages
* Thu Sep 26 2012 Tomas Dabasinskas <tomas@redhat.com> - 1.2.7-4
- For requires, changed python-webob package to python-webob1.2
* Sat Jul 21 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.7-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Wed Jun 26 2012 Ross Delinger <rossdylan@csh.rit.edu> - 1.2-1
- Updated to upstream version 1.2.7
- Disabled unit tests because of false negatives, will be renabled for the 1.3.x
release
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Thu Aug 18 2011 Luke Macken <lmacken@redhat.com> - 1.1.2-1
- Latest upstream release
- Update our requirements
* Wed Jan 2 2010 Luke Macken <lmacken@redhat.com> - 1.0-1
- Initial package