From a61398687faba4e67779649db969150a1827a0d9e082649d622f1257f5fec49b Mon Sep 17 00:00:00 2001 From: Jan Matejek Date: Tue, 5 Sep 2017 11:55:26 +0000 Subject: [PATCH 1/2] Accepting request 521118 from devel:languages:python:singlespec-staging - singlespec auto-conversion - common -doc subpackage - improve packaging of docs OBS-URL: https://build.opensuse.org/request/show/521118 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-FormEncode?expand=0&rev=15 --- python-FormEncode.changes | 6 ++++++ python-FormEncode.spec | 41 ++++++++++++++++++++------------------- 2 files changed, 27 insertions(+), 20 deletions(-) diff --git a/python-FormEncode.changes b/python-FormEncode.changes index 179a6e3..12e8f4b 100644 --- a/python-FormEncode.changes +++ b/python-FormEncode.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Aug 24 13:38:57 UTC 2017 - jmatejek@suse.com + +- singlespec auto-conversion + ------------------------------------------------------------------- Wed Mar 9 10:07:35 UTC 2016 - bwiedemann@suse.com @@ -254,3 +259,4 @@ Thu Oct 13 00:00:00 CET 2005 - jfunk@funktronics.ca - Initial release + diff --git a/python-FormEncode.spec b/python-FormEncode.spec index ea67c73..dc42c29 100644 --- a/python-FormEncode.spec +++ b/python-FormEncode.spec @@ -1,7 +1,7 @@ # # spec file for package python-FormEncode # -# 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,30 +16,31 @@ # +%define oldpython python +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-FormEncode Version: 1.3.0 Release: 0 -Url: http://formencode.org Summary: HTML form validation, generation, and conversion package License: Python-2.0 Group: Development/Languages/Python -Source: http://pypi.python.org/packages/source/F/FormEncode/FormEncode-%{version}.zip +Url: http://formencode.org +Source: https://files.pythonhosted.org/packages/source/F/FormEncode/FormEncode-%{version}.zip Source1: FormEncode-doc-infrastructure.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: fdupes -BuildRequires: python-devel -BuildRequires: python-setuptools -BuildRequires: unzip -Provides: python-formencode = %{version} -Obsoletes: python-formencode < %{version} # Documentation requirements: -BuildRequires: python-Sphinx - -%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 +BuildRequires: %{python_module Sphinx} +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildRequires: unzip +BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch +%ifpython2 +Provides: %{oldpython}-formencode = %{version} +Obsoletes: %{oldpython}-formencode < %{version} %endif +%python_subpackages %description FormEncode validates and converts nested structures. It allows for @@ -61,11 +62,11 @@ sed -i 's/\r$//g' PKG-INFO README.rst sed -i '/^:date:/d' docs/*.txt # fix build-compare %build -python setup.py build -python setup.py build_sphinx && rm build/sphinx/html/.buildinfo +%python_build +%python_exec setup.py build_sphinx && rm build/sphinx/html/.buildinfo %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install # install documentation rm -r %{buildroot}/%{python_sitelib}/docs # remove misplaced documentation @@ -74,14 +75,14 @@ cp -r README.rst build/sphinx/html %{buildroot}%{_docdir}/%{name}/ %fdupes %{buildroot}/%{_prefix} -%files +%files %{python_files} %defattr(-,root,root,-) %exclude %{_docdir}/%{name}/html %doc %dir %{_docdir}/%{name}/ %doc %{_docdir}/%{name}/README.rst %{python_sitelib}/* -%files doc +%files %{python_files doc} %defattr(-,root,root,-) %doc %dir %{_docdir}/%{name}/html %doc %{_docdir}/%{name}/html/* From 942c58b6951054854e8fce6fdfb1b8696e400e0f15aa4a4ed2c6090bd24f8e3a Mon Sep 17 00:00:00 2001 From: Jan Matejek Date: Thu, 7 Sep 2017 15:45:01 +0000 Subject: [PATCH 2/2] Accepting request 522041 from devel:languages:python:singlespec-staging - common -doc subpackage - improve packaging of docs OBS-URL: https://build.opensuse.org/request/show/522041 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-FormEncode?expand=0&rev=16 --- python-FormEncode.changes | 2 ++ python-FormEncode.spec | 26 +++++++++++--------------- 2 files changed, 13 insertions(+), 15 deletions(-) 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