diff --git a/python-WSGIProxy2.spec b/python-WSGIProxy2.spec index bb596e4..b115a71 100644 --- a/python-WSGIProxy2.spec +++ b/python-WSGIProxy2.spec @@ -1,11 +1,9 @@ -# Created by pyp2rpm-1.1.0b %global pypi_name WSGIProxy2 %global package_name wsgiproxy -%global with_python3 1 Name: python-%{pypi_name} Version: 0.4.1 -Release: 9%{?dist} +Release: 10%{?dist} Summary: WSGI Proxy that supports several HTTP backends License: MIT @@ -13,88 +11,63 @@ URL: https://github.com/gawel/WSGIProxy2/ Source0: https://pypi.python.org/packages/source/W/%{pypi_name}/%{pypi_name}-%{version}.zip BuildArch: noarch -BuildRequires: python2-devel -BuildRequires: python-setuptools - -%if 0%{?with_python3} -BuildRequires: python3-devel -BuildRequires: python3-setuptools -%endif # if with_python3 - - %global _description\ WSGI Proxy that supports several HTTP backends. %description %_description -%package -n python2-wsgiproxy2 -Summary: %summary -Requires: python-webob -Requires: python-six -%{?python_provide:%python_provide python2-wsgiproxy2} +%package -n python2-%{pypi_name} +Summary: %summary +BuildRequires: python2-devel +BuildRequires: python2-setuptools +Requires: python2-webob +Requires: python2-six +%{?python_provide:%python_provide python2-%{pypi_name}} + +%description -n python2-%{pypi_name} %_description -%description -n python2-wsgiproxy2 %_description +Python 2 version. -%if 0%{?with_python3} %package -n python3-%{pypi_name} Summary: WSGI Proxy that supports several HTTP backends - +BuildRequires: python3-devel +BuildRequires: python3-setuptools Requires: python3-webob Requires: python3-six +%{?python_provide:%python_provide python3-%{pypi_name}} -%description -n python3-%{pypi_name} -WSGI Proxy that supports several HTTP backends. -This package contains Python 3 build of the library. -%endif # with_python3 +%description -n python3-%{pypi_name} %_description +Python 3 version. %prep %setup -q -n %{pypi_name}-%{version} # Remove bundled egg-info rm -rf %{pypi_name}.egg-info -%if 0%{?with_python3} -rm -rf %{py3dir} -cp -a . %{py3dir} -%endif - %build -%{__python2} setup.py build - -%if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py build -popd -%endif # with_python3 - +%py2_build +%py3_build %install -# Must do the subpackages' install first because the scripts in /usr/bin are -# overwritten with every setup.py install (and we want the python2 version -# to be the default for now). -%if 0%{?with_python3} -pushd %{py3dir} -%{__python3} setup.py install --skip-build --root %{buildroot} -popd -%endif # with_python3 +%py2_install +%py3_install -%{__python2} setup.py install --skip-build --root %{buildroot} - - -%files -n python2-wsgiproxy2 +%files -n python2-%{pypi_name} %doc README_fixt.py README.rst -%{python2_sitelib}/%{package_name} -%{python2_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info +%{python2_sitelib}/%{package_name}/ +%{python2_sitelib}/%{pypi_name}-*.egg-info/ -%if 0%{?with_python3} %files -n python3-%{pypi_name} %doc README_fixt.py README.rst -%{python3_sitelib}/%{package_name} -%{python3_sitelib}/%{pypi_name}-%{version}-py?.?.egg-info -%endif # with_python3 - +%{python3_sitelib}/%{package_name}/ +%{python3_sitelib}/%{pypi_name}-*.egg-info/ %changelog +* Fri Aug 25 2017 Igor Gnatenko - 0.4.1-10 +- Modernize spec +- Get back old name + * Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 0.4.1-9 - Python 2 binary package renamed to python2-wsgiproxy2 See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3