diff --git a/python-paste-deploy.spec b/python-paste-deploy.spec index 02ac700..b679fa5 100644 --- a/python-paste-deploy.spec +++ b/python-paste-deploy.spec @@ -2,6 +2,10 @@ %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} %endif +%if 0%{?fedora} +%global with_python3 1 +%endif + Name: python-paste-deploy Version: 1.5.0 Release: 6%{?dist} @@ -14,8 +18,8 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildArch: noarch # 1.5.0+ dropped Python 2.4 support -BuildRequires: python2-devel > 2.4 -BuildRequires: python-setuptools +BuildRequires: python2-devel > 2.4 +BuildRequires: python-setuptools Requires: python-paste Requires: python-setuptools @@ -25,18 +29,57 @@ URIs; these URIs can refer to Python Eggs for INI-style configuration files. PasteScript provides commands to serve applications based on this configuration file. +%if 0%{with_python3} +%package -n python3-paste-deploy +Summary: Load, configure, and compose WSGI applications and servers +Group: System Environment/Libraries + +BuildRequires: python3-devel +BuildRequires: python3-setuptools +Requires: python3-paste +Requires: python3-setuptools + +%description -n python3-paste-deploy +This tool provides code to load WSGI applications and servers from +URIs; these URIs can refer to Python Eggs for INI-style configuration +files. PasteScript provides commands to serve applications based on +this configuration file. + +%endif + + %prep %setup -q -n PasteDeploy-%{version} +# Remove bundled egg-info if it exists +rm -rf *.egg-info + +%if 0%{?with_python3} +rm -rf %{py3dir} +cp -a . %{py3dir} +%endif %build %{__python} setup.py build +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py build +popd +%endif + %install rm -rf %{buildroot} %{__python} setup.py install --skip-build --root=%{buildroot} -rm -rf %{buildroot}%{pythonsitelib}/test +rm -rf %{buildroot}%{python_sitelib}/test + +%if 0%{?with_python3} +pushd %{py3dir} +%{__python3} setup.py install --skip-build --root=%{buildroot} +rm -rf %{buildroot}%{python3_sitelib}/test +popd +%endif %clean rm -rf %{buildroot} @@ -47,9 +90,19 @@ rm -rf %{buildroot} %doc docs/* %{python_sitelib}/* +%if 0%{?with_python3} +%files -n python3-paste-deploy +%doc docs/* +%{python3_sitelib}/* +%endif + %changelog +* Wed Feb 27 2013 Ralph Bean - 1.5.0-7 +- Added python3 subpackage. +- Corrected pythonsitelib typo in %%install section. + * Thu Feb 14 2013 Fedora Release Engineering - 1.5.0-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild