diff --git a/python-zope.hookable.changes b/python-zope.hookable.changes index b82eda4..83b317a 100644 --- a/python-zope.hookable.changes +++ b/python-zope.hookable.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Jul 8 07:02:54 UTC 2017 - aloisio@gmx.com + +- Converted to single-spec + ------------------------------------------------------------------- Fri May 15 12:00:44 UTC 2015 - benoit.monin@gmx.fr diff --git a/python-zope.hookable.spec b/python-zope.hookable.spec index 66c5f8a..69aabc4 100644 --- a/python-zope.hookable.spec +++ b/python-zope.hookable.spec @@ -1,7 +1,7 @@ # # spec file for package python-zope.hookable # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # Copyright (c) 2013 LISA GmbH, Bingen, Germany. # # All modifications and additions to the file contributed by third parties @@ -17,24 +17,26 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-zope.hookable Version: 4.0.4 Release: 0 -Url: http://www.python.org/pypi/zope.hookable Summary: Zope hookable License: ZPL-2.1 Group: Development/Languages/Python -Source: https://pypi.python.org/packages/source/z/zope.hookable/zope.hookable-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: python-devel -BuildRequires: python-setuptools -# Documentation requirements: -BuildRequires: python-Sphinx -# Testing requirements: -BuildRequires: python-zope.testing -%if 0%{?suse_version} && 0%{?suse_version} <= 1110 -%{!?python_sitearch: %global python_sitearch %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} -%endif +Url: http://www.python.org/pypi/zope.hookable +Source: https://files.pythonhosted.org/packages/source/z/zope.hookable/zope.hookable-%{version}.tar.gz +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +# SECTION documentation requirements +BuildRequires: %{python_module Sphinx} +# /SECTION +# SECTION testing requirements +BuildRequires: %{python_module zope.testing} +# /SECTION +%python_subpackages %description Hookable object support. @@ -47,35 +49,38 @@ hookable. Later, someone can modify what it does by calling its sethook method and changing its implementation. All users of the function, including those that imported it, will see the change. -%package doc +%package -n %{name}-doc Summary: Zope hookable Group: Development/Languages/Python +Provides: %{python_module zope.hookable-doc = %{version}} Requires: %{name} = %{version} -%description doc +%description -n %{name}-doc This package contains documentation files for %{name}. %prep %setup -q -n zope.hookable-%{version} +rm -rf zope.hookable.egg-info %build -python setup.py build -PYTHONPATH=$(echo $(pwd)/build/lib.*) python setup.py build_sphinx && rm build/sphinx/html/.buildinfo +%python_build +%__python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo build/sphinx/html/objects.inv %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} -rm -f %{buildroot}%python_sitearch/zope/hookable/_zope_hookable.c +%python_install +%{python_expand rm -f %{buildroot}%{$python_sitearch}/zope/hookable/_zope_hookable.c + %fdupes -s %{buildroot}%{$python_sitearch} +} %check -python setup.py test +%python_exec setup.py test -%files -%defattr(-,root,root,-) +%files %{python_files} %doc CHANGES.rst COPYRIGHT.txt LICENSE.txt README.rst -%python_sitearch/* +%{python_sitearch}/* -%files doc -%defattr(-,root,root,-) +%files -n %{name}-doc +%defattr(-,root,root) %doc build/sphinx/html/ %changelog