diff --git a/python-pecan.changes b/python-pecan.changes index 798ab18..1f35e21 100644 --- a/python-pecan.changes +++ b/python-pecan.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jun 29 16:40:00 UTC 2017 - tbechtold@suse.com + +- convert to singlespec +- fix Source url + ------------------------------------------------------------------- Tue Nov 15 11:01:05 UTC 2016 - dmueller@suse.com diff --git a/python-pecan.spec b/python-pecan.spec index 5a7d9bc..f86c7a6 100644 --- a/python-pecan.spec +++ b/python-pecan.spec @@ -1,7 +1,7 @@ # # spec file for package python-pecan # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,6 +16,7 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pecan Version: 1.2.1 Release: 0 @@ -23,27 +24,25 @@ Summary: A WSGI object-dispatching web framework, designed to be lean and License: BSD-3-Clause Group: Development/Languages/Python Url: http://github.com/dreamhost/pecan -Source: https://pypi.python.org/packages/source/p/pecan/pecan-%{version}.tar.gz -BuildRequires: python-devel -BuildRequires: python-setuptools +Source: https://files.pythonhosted.org/packages/source/p/pecan/pecan-%{version}.tar.gz +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: python-rpm-macros # Test requirements: %if 0%{?suse_version} >= 1230 && 0%{?suse_version} != 1315 -BuildRequires: python-Genshi -BuildRequires: python-Jinja2 -BuildRequires: python-Kajiki -BuildRequires: python-Mako >= 0.4.0 -BuildRequires: python-SQLAlchemy -BuildRequires: python-WebTest >= 1.3.1 -BuildRequires: python-gunicorn -BuildRequires: python-logutils -BuildRequires: python-mock -BuildRequires: python-singledispatch -BuildRequires: python-virtualenv -%endif -BuildRequires: python-six -%if 0%{?suse_version} && 0%{?suse_version} <= 1110 -Requires: python-ordereddict +BuildRequires: %{python_module Genshi} +BuildRequires: %{python_module Jinja2} +BuildRequires: %{python_module Kajiki} +BuildRequires: %{python_module Mako >= 0.4.0} +BuildRequires: %{python_module SQLAlchemy} +BuildRequires: %{python_module WebTest >= 1.3.1} +BuildRequires: %{python_module gunicorn} +BuildRequires: %{python_module logutils} +BuildRequires: %{python_module mock} +BuildRequires: %{python_module virtualenv} +BuildRequires: python2-singledispatch %endif +BuildRequires: %{python_module six} Requires: python-Mako >= 0.4.0 Requires: python-WebOb >= 1.2dev Requires: python-WebTest >= 1.3.1 @@ -56,11 +55,11 @@ Suggests: python-Genshi Suggests: python-gunicorn %endif BuildRoot: %{_tmppath}/%{name}-%{version}-build -%if 0%{?suse_version} && 0%{?suse_version} <= 1110 -%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} -%else +Requires(post): update-alternatives +Requires(postun): update-alternatives BuildArch: noarch -%endif + +%python_subpackages %description A WSGI object-dispatching web framework, designed to be lean and fast with few dependencies. @@ -71,21 +70,31 @@ A WSGI object-dispatching web framework, designed to be lean and fast with few d sed -i "/'Kajiki',/d" setup.py %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install +%python_clone -a %{buildroot}%{_bindir}/pecan +%python_clone -a %{buildroot}%{_bindir}/gunicorn_pecan %if 0%{?suse_version} >= 1230 && 0%{?suse_version} != 1315 %check -python setup.py test +%python_exec setup.py test %endif -%files +%post +%python_install_alternative pecan +%python_install_alternative gunicorn_pecan + +%postun +%python_uninstall_alternative pecan +%python_uninstall_alternative gunicorn_pecan + +%files %{python_files} %defattr(-,root,root,-) %doc LICENSE README.rst -%{_bindir}/pecan -%{_bindir}/gunicorn_pecan +%python_alternative %{_bindir}/pecan +%python_alternative %{_bindir}/gunicorn_pecan %{python_sitelib}/* %changelog