From 3ca5d26bf62d0c59830d7ce051f20c618d84f589c6d8fc4dd6a79b4abd05a358 Mon Sep 17 00:00:00 2001 From: Jan Matejek Date: Fri, 17 Feb 2017 15:47:03 +0000 Subject: [PATCH 1/2] Accepting request 458703 from devel:languages:python:singlespec - update to run tests against python3 as well - update for multipython build OBS-URL: https://build.opensuse.org/request/show/458703 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-six?expand=0&rev=46 --- python-six-doc.changes | 5 +++++ python-six-doc.spec | 14 ++++++++------ python-six.changes | 5 +++++ python-six.spec | 30 +++++++++++++----------------- 4 files changed, 31 insertions(+), 23 deletions(-) diff --git a/python-six-doc.changes b/python-six-doc.changes index 087059b..c75a48d 100644 --- a/python-six-doc.changes +++ b/python-six-doc.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Oct 5 14:34:05 UTC 2016 - jmatejek@suse.com + +- update to run tests against python3 as well + ------------------------------------------------------------------- Tue Jan 19 09:07:19 UTC 2016 - toddrme2178@gmail.com diff --git a/python-six-doc.spec b/python-six-doc.spec index c014945..7a2d305 100644 --- a/python-six-doc.spec +++ b/python-six-doc.spec @@ -1,7 +1,7 @@ # # spec file for package python-six-doc # -# 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-%1 python3-%1} Name: python-six-doc Version: 1.10.0 Release: 0 @@ -25,12 +26,13 @@ License: MIT Group: Development/Libraries/Python Source: http://pypi.python.org/packages/source/s/six/six-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: python-six +BuildRequires: %{python_module Sphinx} +BuildRequires: %{python_module six} # Documentation requirements: -BuildRequires: python-Sphinx # Test requirements: -BuildRequires: python-py -BuildRequires: python-pytest +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module py} +BuildRequires: python-rpm-macros BuildArch: noarch %description @@ -56,7 +58,7 @@ cd documentation && make html && rm _build/html/.buildinfo mkdir test cp test_six.py test pushd test -py.test test_six.py +%python_exec %{_bindir}/py.test test_six.py popd rm -rf test diff --git a/python-six.changes b/python-six.changes index f73e847..62d5c7c 100644 --- a/python-six.changes +++ b/python-six.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Oct 5 14:33:14 UTC 2016 - jmatejek@suse.com + +- update for multipython build + ------------------------------------------------------------------- Tue Feb 9 07:45:20 UTC 2016 - olaf@aepfle.de diff --git a/python-six.spec b/python-six.spec index 8124b94..20b6a55 100644 --- a/python-six.spec +++ b/python-six.spec @@ -1,7 +1,7 @@ # # spec file for package python-six # -# 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-%1 python3-%1} Name: python-six Version: 1.10.0 Release: 0 @@ -25,16 +26,17 @@ License: MIT Group: Development/Libraries/Python Source: http://pypi.python.org/packages/source/s/six/six-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: python-devel -%if 0%{?suse_version} <= 1110 -BuildRequires: python-argparse -Requires: python-argparse -%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} -%endif +BuildRequires: %{python_module base} +BuildRequires: python-rpm-macros %if 0%{?suse_version} > 1110 BuildArch: noarch +%else +BuildRequires: python-argparse +Requires: python-argparse %endif +%python_subpackages + %description Six is a Python 2 and 3 compatibility library. It provides utility functions for smoothing over the differences between the Python @@ -46,28 +48,22 @@ what is provided. %setup -q -n six-%{version} %build -python setup.py build +%python_build # due to cyclic requirements between Sphinx and six, # documentation is build in its own package %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install # Run tests in -doc package to avoid dependency loop # %check # python test_six.py -%pre -# previous versions of the package installed .egg-info as a directory, -# the new update now installs it as a file. Clean out the directory, should it exist. -if [ -d %{python_sitelib}/six-%{version}-py%{py_ver}.egg-info ]; then - rm -rf %{python_sitelib}/six-%{version}-py%{py_ver}.egg-info -fi - -%files +%files %python_files %defattr(-,root,root) %doc LICENSE README %{python_sitelib}/six.py* +%pycache_only %{python3_sitelib}/__pycache__/* %{python_sitelib}/six-%{version}-py*.egg-info %changelog From 498b7a1f78377bc8a001b83050b391f8e2bb6c1b9909ffcf1d41b347908540da Mon Sep 17 00:00:00 2001 From: Jan Matejek Date: Fri, 24 Feb 2017 14:34:14 +0000 Subject: [PATCH 2/2] Accepting request 460224 from devel:languages:python:singlespec - update for singlespec - only use python3 version of Sphinx to build docs - provide $flavor-doc for all pythons OBS-URL: https://build.opensuse.org/request/show/460224 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-six?expand=0&rev=47 --- python-six-doc.changes | 6 ++++-- python-six-doc.spec | 9 ++++++--- python-six.spec | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/python-six-doc.changes b/python-six-doc.changes index c75a48d..43e933a 100644 --- a/python-six-doc.changes +++ b/python-six-doc.changes @@ -1,7 +1,9 @@ ------------------------------------------------------------------- -Wed Oct 5 14:34:05 UTC 2016 - jmatejek@suse.com +Thu Feb 23 14:47:06 UTC 2017 - jmatejek@suse.com -- update to run tests against python3 as well +- update for singlespec +- only use python3 version of Sphinx to build docs +- provide $flavor-doc for all pythons ------------------------------------------------------------------- Tue Jan 19 09:07:19 UTC 2016 - toddrme2178@gmail.com diff --git a/python-six-doc.spec b/python-six-doc.spec index 7a2d305..1c24829 100644 --- a/python-six-doc.spec +++ b/python-six-doc.spec @@ -16,7 +16,7 @@ # -%{?!python_module:%define python_module() python-%1 python3-%1} +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-six-doc Version: 1.10.0 Release: 0 @@ -26,14 +26,17 @@ License: MIT Group: Development/Libraries/Python Source: http://pypi.python.org/packages/source/s/six/six-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: %{python_module Sphinx} BuildRequires: %{python_module six} -# Documentation requirements: +# require old python 2 explicitly to get the ssl module +BuildRequires: python +# require only one version of Sphinx for now +BuildRequires: python3-Sphinx # Test requirements: BuildRequires: %{python_module pytest} BuildRequires: %{python_module py} BuildRequires: python-rpm-macros BuildArch: noarch +Provides: %{python_module six-doc = %{version}} %description Six is a Python 2 and 3 compatibility library. It provides utility diff --git a/python-six.spec b/python-six.spec index 20b6a55..7f716de 100644 --- a/python-six.spec +++ b/python-six.spec @@ -16,7 +16,7 @@ # -%{?!python_module:%define python_module() python-%1 python3-%1} +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-six Version: 1.10.0 Release: 0