|
|
|
@ -1,91 +1,62 @@
|
|
|
|
|
%if 0%{?fedora}
|
|
|
|
|
%global with_python3 1
|
|
|
|
|
%endif
|
|
|
|
|
%global srcname waitress
|
|
|
|
|
|
|
|
|
|
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
|
|
|
|
%global _docdir_fmt %{name}
|
|
|
|
|
|
|
|
|
|
Name: python-%{srcname}
|
|
|
|
|
Version: 0.9.0
|
|
|
|
|
Release: 2%{?dist}
|
|
|
|
|
Release: 3%{?dist}
|
|
|
|
|
Summary: Waitress WSGI server
|
|
|
|
|
|
|
|
|
|
License: ZPLv2.1
|
|
|
|
|
URL: https://github.com/Pylons/%{srcname}
|
|
|
|
|
Source0: https://files.pythonhosted.org/packages/source/w/%{srcname}/%{srcname}-%{version}.tar.gz
|
|
|
|
|
Source0: %{url}/archive/v%{version}/%{srcname}-%{version}.tar.gz
|
|
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
BuildRequires: python2-devel
|
|
|
|
|
BuildRequires: python-setuptools
|
|
|
|
|
BuildRequires: python-nose
|
|
|
|
|
BuildRequires: python-coverage
|
|
|
|
|
BuildRequires: python-sphinx
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
Waitress is meant to be a production-quality pure-Python WSGI server with
|
|
|
|
|
very acceptable performance. It has no dependencies except ones which live
|
|
|
|
|
in the Python standard library. It runs on CPython on Unix and Windows under
|
|
|
|
|
Python 2.6+ and Python 3.3+. It is also known to run on PyPy 1.6.0+ on UNIX.
|
|
|
|
|
|
|
|
|
|
# No docs as we don't have packaged pylons theme for sphinx
|
|
|
|
|
|
|
|
|
|
%global _description \
|
|
|
|
|
Waitress is meant to be a production-quality pure-Python WSGI server with\
|
|
|
|
|
very acceptable performance. It has no dependencies except ones which live\
|
|
|
|
|
in the Python standard library. It runs on CPython on Unix and Windows under\
|
|
|
|
|
Python 2.6+ and Python 3.3+. It is also known to run on PyPy 1.6.0+ on UNIX.\
|
|
|
|
|
It supports HTTP/1.0 and HTTP/1.1.
|
|
|
|
|
|
|
|
|
|
For more information, see %{_pkgdocdir}/docs or
|
|
|
|
|
http://docs.pylonsproject.org/projects/waitress/en/latest/ .
|
|
|
|
|
%description %{_description}
|
|
|
|
|
|
|
|
|
|
%package -n python2-%{srcname}
|
|
|
|
|
Summary: %{summary}
|
|
|
|
|
%{?python_provide:%python_provide python2-%{srcname}}
|
|
|
|
|
BuildRequires: python2-devel
|
|
|
|
|
BuildRequires: python2-setuptools
|
|
|
|
|
BuildRequires: python2-nose
|
|
|
|
|
BuildRequires: python2-coverage
|
|
|
|
|
|
|
|
|
|
%description -n python2-%{srcname} %{_description}
|
|
|
|
|
|
|
|
|
|
Python 2 version.
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
%package -n python3-%{srcname}
|
|
|
|
|
Summary: Waitress WSGI server
|
|
|
|
|
Requires: python3
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
|
BuildRequires: python3-setuptools
|
|
|
|
|
BuildRequires: python3-nose
|
|
|
|
|
BuildRequires: python3-coverage
|
|
|
|
|
BuildRequires: python3-sphinx
|
|
|
|
|
|
|
|
|
|
%description -n python3-%{srcname}
|
|
|
|
|
Waitress is meant to be a production-quality pure-Python WSGI server with
|
|
|
|
|
very acceptable performance. It has no dependencies except ones which live
|
|
|
|
|
in the Python standard library. It runs on CPython on Unix and Windows under
|
|
|
|
|
Python 2.6+ and Python 3.3+. It is also known to run on PyPy 1.6.0+ on UNIX.
|
|
|
|
|
It supports HTTP/1.0 and HTTP/1.1.
|
|
|
|
|
%description -n python3-%{srcname} %{_description}
|
|
|
|
|
|
|
|
|
|
For more information, see %{_pkgdocdir}/docs or
|
|
|
|
|
http://docs.pylonsproject.org/projects/waitress/en/latest/ .
|
|
|
|
|
%endif
|
|
|
|
|
Python 3 version.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n %{srcname}-%{version}
|
|
|
|
|
rm -rf waitress.egg-info
|
|
|
|
|
rm -f .gitignore docs/.gitignore
|
|
|
|
|
# this script has devel paths, not useful in a user system
|
|
|
|
|
rm -f docs/rebuild
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
rm -rf %{py3dir}
|
|
|
|
|
cp -a . %{py3dir}
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%autosetup -n %{srcname}-%{version}
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%{__python2} setup.py build
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
pushd %{py3dir}
|
|
|
|
|
%{__python3} setup.py build
|
|
|
|
|
popd
|
|
|
|
|
%endif
|
|
|
|
|
%py2_build
|
|
|
|
|
%py3_build
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
# Run the Python 3 install first so that the Python 2 version
|
|
|
|
|
# of /usr/bin/waitress-server "wins":
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
pushd %{py3dir}
|
|
|
|
|
%{__python3} setup.py install --skip-build --root $RPM_BUILD_ROOT
|
|
|
|
|
popd
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%{__python2} setup.py install --skip-build --root $RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
|
|
%py2_install
|
|
|
|
|
%py3_install
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
# by setting the PYTHONPATH to the current dir
|
|
|
|
@ -93,30 +64,26 @@ popd
|
|
|
|
|
# Usually the testsuite is run after installing
|
|
|
|
|
# the package in develop mode but we can't install
|
|
|
|
|
# in develop mode here.
|
|
|
|
|
PYTHONPATH=. %{__python2} setup.py nosetests
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
pushd %{py3dir}
|
|
|
|
|
PYTHONPATH=. %{__python3} setup.py nosetests
|
|
|
|
|
popd
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%doc README.rst CHANGES.txt COPYRIGHT.txt LICENSE.txt docs
|
|
|
|
|
PYTHONPATH=%{buildroot}%{python2_sitelib} %{__python2} setup.py nosetests
|
|
|
|
|
PYTHONPATH=%{buildroot}%{python3_sitelib} %{__python3} setup.py nosetests
|
|
|
|
|
|
|
|
|
|
%files -n python2-%{srcname}
|
|
|
|
|
%license COPYRIGHT.txt LICENSE.txt
|
|
|
|
|
%doc README.rst CHANGES.txt
|
|
|
|
|
%{python2_sitelib}/%{srcname}/
|
|
|
|
|
%{python2_sitelib}/%{srcname}-*.egg-info/
|
|
|
|
|
|
|
|
|
|
%files -n python3-%{srcname}
|
|
|
|
|
%license COPYRIGHT.txt LICENSE.txt
|
|
|
|
|
%doc README.rst CHANGES.txt
|
|
|
|
|
%{_bindir}/waitress-serve
|
|
|
|
|
%{python2_sitelib}/waitress
|
|
|
|
|
%{python2_sitelib}/waitress-%{version}-py2.?.egg-info
|
|
|
|
|
|
|
|
|
|
%if 0%{?with_python3}
|
|
|
|
|
%files -n python3-waitress
|
|
|
|
|
%doc README.rst CHANGES.txt COPYRIGHT.txt LICENSE.txt docs
|
|
|
|
|
%{python3_sitelib}/waitress
|
|
|
|
|
%{python3_sitelib}/waitress-%{version}-py3.?.egg-info
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%{python3_sitelib}/%{srcname}/
|
|
|
|
|
%{python3_sitelib}/%{srcname}-*.egg-info/
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Wed Jun 29 2016 Igor Gnatenko <ignatenko@redhat.com> - 0.9.0-3
|
|
|
|
|
- Modernize spec to comply with new packaging guidelines
|
|
|
|
|
|
|
|
|
|
* Thu May 26 2016 Lorenzo Gil Sanchez <lorenzo.gil.sanchez@gmail.com> - 0.9.0-2
|
|
|
|
|
- Fixed Source0 to point to new PyPi predictable URL format
|
|
|
|
|
|
|
|
|
|