From beaa09d6bb03ded224facbe1b5d0a16b06e5b3c1 Mon Sep 17 00:00:00 2001 From: Ralph Bean Date: Feb 22 2013 15:48:12 +0000 Subject: Stub for python3 subpackage. --- diff --git a/python-pyramid.spec b/python-pyramid.spec index c68aa81..ba68a9e 100644 --- a/python-pyramid.spec +++ b/python-pyramid.spec @@ -1,25 +1,27 @@ +%if 0%{?fedora} +# Manually disable python3 for now. Some deps are not ready. +%global with_python3 0 +%endif + %global modname pyramid Name: python-%{modname} Version: 1.4 -Release: 3%{?dist} +Release: 5%{?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 -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch BuildRequires: python2-devel BuildRequires: python-setuptools-devel -BuildRequires: python-virtualenv BuildRequires: python-docutils BuildRequires: python-sphinx BuildRequires: python-chameleon >= 1.2.3 -BuildRequires: python-paste > 1.7 BuildRequires: python-setuptools BuildRequires: python-zope-component >= 3.6.0 BuildRequires: python-translationstring @@ -29,7 +31,6 @@ BuildRequires: python-zope-configuration BuildRequires: python-zope-deprecation >= 3.5.0 Requires: python-chameleon >= 1.2.3 -Requires: python-paste > 1.7 Requires: python-setuptools Requires: python-zope-component >= 3.6.0 Requires: python-translationstring @@ -44,8 +45,6 @@ Requires: python-webob1.2 # Handle forwards-compat packages for rhel/el6 %if 0%{?rhel} && 0%{?rhel} <= 6 BuildRequires: python-webtest1.3 -BuildRequires: python-paste-script >= 1.7.3 -Requires: python-paste-script >= 1.7.3 BuildRequires: python-mako0.4 Requires: python-mako0.4 BuildRequires: python-zope-interface4 @@ -58,8 +57,6 @@ BuildRequires: python-ordereddict Requires: python-ordereddict %else BuildRequires: python-webtest -BuildRequires: python-paste-script >= 1.7.4 -Requires: python-paste-script >= 1.7.4 BuildRequires: python-mako >= 0.3.6 Requires: python-mako >= 0.3.6 BuildRequires: python-zope-interface >= 3.8.0 @@ -68,28 +65,106 @@ BuildRequires: python-paste-deploy >= 1.5.0 Requires: python-paste-deploy >= 1.5.0 %endif +%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-webob1.2 +BuildRequires: python3-webtest +BuildRequires: python3-mako +BuildRequires: python3-zope-interface +BuildRequires: python3-paste-deploy +%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-webob1.2 +Requires: python3-mako >= 0.3.6 +Requires: python3-zope-interface >= 3.8.0 +Requires: python3-paste-deploy >= 1.5.0 + +%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.2.1\", \"PasteDeploy==1.5.0\", \"WebTest==1.3.4\", \"zope.interface>=4.0.2\"]; import pkg_resources"}1' setup.py > setup.py.tmp +awk 'NR==1{print "import __main__; __main__.__requires__ = __requires__ = [\"WebOb>=1.2.1\", \"PasteDeploy==1.5.0\", \"WebTest==1.3.4\", \"zope.interface>=4.0.2\"]; import pkg_resources"}1' setup.py > setup.py.tmp mv setup.py.tmp setup.py +%if 0%{?with_python3} +rm -rf %{py3dir} +cp -a . %{py3dir} +%endif + %build +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py build +# Remove bundled egg info +rm -rf %{modname}.egg-info +popd +%endif + %{__python} setup.py build # Remove bundled egg info rm -rf %{modname}.egg-info %install +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py install --skip-build --root=%{buildroot} +mv %{buildroot}/%{_bindir}/bfg2pyramid %{buildroot}/%{_bindir}/python3-bfg2pyramid +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 +popd +%endif + %{__python} setup.py install -O1 --skip-build --root %{buildroot} %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 @@ -108,10 +183,34 @@ rm -rf %{modname}.egg-info %{_bindir}/ptweens %{_bindir}/pviews +%if 0%{?with_python3} +%files -n python3-pyramid +%doc README.rst LICENSE.txt +%{python3_sitelib}/%{modname}* +%{_bindir}/bfg2pyramid +%{_bindir}/pcreate +%{_bindir}/pserve +%{_bindir}/prequest +%{_bindir}/proutes +%{_bindir}/pshell +%{_bindir}/ptweens +%{_bindir}/pviews +%endif + %changelog -* Thu Feb 14 2013 Fedora Release Engineering - 1.4-3 +* Fri Feb 22 2013 Ralph Bean - 1.4-5 +- Manually disabled python3 subpackage; waiting on deps. +- Loosened constraint on python-webob version. + +* Thu Feb 14 2013 Fedora Release Engineering - 1.4-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild +* Wed Jan 16 2013 Ralph Bean - 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 - 1.4-2 - Add zope.interface to the setuptools hack for el6. - Add dep on python-unittest2 for el6.