diff --git a/python-FormEncode.changes b/python-FormEncode.changes index 12e8f4b..487464f 100644 --- a/python-FormEncode.changes +++ b/python-FormEncode.changes @@ -2,6 +2,8 @@ Thu Aug 24 13:38:57 UTC 2017 - jmatejek@suse.com - singlespec auto-conversion +- common -doc subpackage +- improve packaging of docs ------------------------------------------------------------------- Wed Mar 9 10:07:35 UTC 2016 - bwiedemann@suse.com diff --git a/python-FormEncode.spec b/python-FormEncode.spec index dc42c29..540ead9 100644 --- a/python-FormEncode.spec +++ b/python-FormEncode.spec @@ -28,11 +28,11 @@ Url: http://formencode.org Source: https://files.pythonhosted.org/packages/source/F/FormEncode/FormEncode-%{version}.zip Source1: FormEncode-doc-infrastructure.tar.gz # Documentation requirements: -BuildRequires: %{python_module Sphinx} BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros +BuildRequires: python3-Sphinx BuildRequires: unzip BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch @@ -47,12 +47,12 @@ FormEncode validates and converts nested structures. It allows for a declarative form of defining the validation, and decoupled processes for filling and generating forms. -%package doc +%package -n %{name}-doc Summary: HTML form validation, generation, and conversion package Group: Development/Libraries/Python -Requires: %{name} = %{version} +Provides: %{python_module FormEncode-doc = %{version}} -%description doc +%description -n %{name}-doc This package contains documentation files for %{name}. %prep @@ -63,28 +63,24 @@ sed -i '/^:date:/d' docs/*.txt # fix build-compare %build %python_build -%python_exec setup.py build_sphinx && rm build/sphinx/html/.buildinfo +%{_python_use_flavor python3} +python3 setup.py build_sphinx && rm build/sphinx/html/.buildinfo && mv build/sphinx/html html %install %python_install # install documentation -rm -r %{buildroot}/%{python_sitelib}/docs # remove misplaced documentation -mkdir -p %{buildroot}%{_docdir}/%{name} -cp -r README.rst build/sphinx/html %{buildroot}%{_docdir}/%{name}/ +rm -r %{buildroot}%{python_sitelib}/docs # remove misplaced documentation -%fdupes %{buildroot}/%{_prefix} +%fdupes %{buildroot}%{_prefix} %files %{python_files} %defattr(-,root,root,-) -%exclude %{_docdir}/%{name}/html -%doc %dir %{_docdir}/%{name}/ -%doc %{_docdir}/%{name}/README.rst +%doc README.rst %{python_sitelib}/* -%files %{python_files doc} +%files -n %{name}-doc %defattr(-,root,root,-) -%doc %dir %{_docdir}/%{name}/html -%doc %{_docdir}/%{name}/html/* +%doc html %changelog