From a449637d44d982879066e610dc70539638419532b696c0809fe63da41a5d3367 Mon Sep 17 00:00:00 2001 From: Todd R Date: Mon, 24 Apr 2017 15:04:00 +0000 Subject: [PATCH 1/2] Accepting request 489996 from home:alois:branches:devel:languages:python Converted to single-spec (2nd attempt) OBS-URL: https://build.opensuse.org/request/show/489996 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-argh?expand=0&rev=15 --- python-argh-0.26.1-fix-testsuite.patch | 10 +++++++ python-argh.changes | 7 +++++ python-argh.spec | 40 ++++++++++++++++---------- 3 files changed, 42 insertions(+), 15 deletions(-) create mode 100644 python-argh-0.26.1-fix-testsuite.patch diff --git a/python-argh-0.26.1-fix-testsuite.patch b/python-argh-0.26.1-fix-testsuite.patch new file mode 100644 index 0000000..d67a0d7 --- /dev/null +++ b/python-argh-0.26.1-fix-testsuite.patch @@ -0,0 +1,10 @@ +Index: argh-0.26.1/test/test_integration.py +=================================================================== +--- argh-0.26.1.orig/test/test_integration.py ++++ argh-0.26.1/test/test_integration.py +@@ -772,4 +772,4 @@ def test_unknown_args(): + assert run(p, '--bar 1', exit=True) == 'unrecognized arguments: --bar 1' + assert run(p, '--bar 1', exit=False, + kwargs={'skip_unknown_args': True}) == \ +- R(out='usage: py.test [-h] [-f FOO]\n\n', err='') ++ R(out='usage: setup.py [-h] [-f FOO]\n\n', err='') diff --git a/python-argh.changes b/python-argh.changes index 8a299f8..cb12bdd 100644 --- a/python-argh.changes +++ b/python-argh.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sun Apr 23 08:19:15 UTC 2017 - aloisio@gmx.com + +- Converted to single-spec +- Added python-argh-0.26.1-fix-testsuite.patch +- Enabled tests + ------------------------------------------------------------------- Sun Apr 19 16:29:05 UTC 2015 - benoit.monin@gmx.fr diff --git a/python-argh.spec b/python-argh.spec index 8469cf5..73628dc 100644 --- a/python-argh.spec +++ b/python-argh.spec @@ -1,7 +1,7 @@ # # spec file for package python-argh # -# Copyright (c) 2015 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,24 +16,27 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-argh Version: 0.26.1 Release: 0 -Url: https://github.com/neithere/argh/ Summary: A simple argparse wrapper License: LGPL-3.0+ Group: Development/Languages/Python -Source: http://pypi.python.org/packages/source/a/argh/argh-%{version}.tar.gz +Url: https://github.com/neithere/argh/ +Source: http://files.pythonhosted.org/packages/source/a/argh/argh-%{version}.tar.gz +# PATCH-FIX-OPENSUSE python-argh-0.26.1-fix-testsuite.patch -- so that tests can run on OBS +Patch0: python-argh-0.26.1-fix-testsuite.patch +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +# test requirements +BuildRequires: %{python_module mock} +BuildRequires: %{python_module pytest} BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: python-argparse >= 1.1 -BuildRequires: python-devel -BuildRequires: python-setuptools -Requires: python-argparse >= 1.1 -%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 BuildArch: noarch -%endif +%python_subpackages %description Agrh, argparse! @@ -61,16 +64,23 @@ work that a custom dispatcher may not do. %prep %setup -q -n argh-%{version} +%patch0 -p1 %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install +%python_expand %fdupes -s %{buildroot}%{$python_sitelib} -%files +%check +export LC_CTYPE="en_US.UTF-8" +%python_exec setup.py test + +%files %{python_files} %defattr(-,root,root,-) %doc README.rst -%{python_sitelib}/* +%{python_sitelib}/argh +%{python_sitelib}/argh-%{version}-py%{python_version}.egg-info %changelog From 2eceafdf7851d8be5d82ba6f65bd472fb7dd27422f8cd806f8383e3fbd624013 Mon Sep 17 00:00:00 2001 From: Todd R Date: Mon, 24 Apr 2017 17:35:58 +0000 Subject: [PATCH 2/2] Accepting request 490829 from home:TheBlackCat:branches:devel:languages:python - Fix source URL - Various small spec file cleanups. OBS-URL: https://build.opensuse.org/request/show/490829 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-argh?expand=0&rev=16 --- python-argh.changes | 6 ++++++ python-argh.spec | 12 +++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/python-argh.changes b/python-argh.changes index cb12bdd..088aeea 100644 --- a/python-argh.changes +++ b/python-argh.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Mon Apr 24 17:32:13 UTC 2017 - toddrme2178@gmail.com + +- Fix source URL +- Various small spec file cleanups. + ------------------------------------------------------------------- Sun Apr 23 08:19:15 UTC 2017 - aloisio@gmx.com diff --git a/python-argh.spec b/python-argh.spec index 73628dc..9d831d0 100644 --- a/python-argh.spec +++ b/python-argh.spec @@ -16,6 +16,8 @@ # +%bcond_without tests + %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-argh Version: 0.26.1 @@ -24,7 +26,7 @@ Summary: A simple argparse wrapper License: LGPL-3.0+ Group: Development/Languages/Python Url: https://github.com/neithere/argh/ -Source: http://files.pythonhosted.org/packages/source/a/argh/argh-%{version}.tar.gz +Source: https://files.pythonhosted.org/packages/source/a/argh/argh-%{version}.tar.gz # PATCH-FIX-OPENSUSE python-argh-0.26.1-fix-testsuite.patch -- so that tests can run on OBS Patch0: python-argh-0.26.1-fix-testsuite.patch BuildRequires: %{python_module devel} @@ -32,8 +34,10 @@ BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros # test requirements +%if %{with tests} BuildRequires: %{python_module mock} BuildRequires: %{python_module pytest} +%endif BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch %python_subpackages @@ -73,14 +77,16 @@ work that a custom dispatcher may not do. %python_install %python_expand %fdupes -s %{buildroot}%{$python_sitelib} +%if %{with tests} %check export LC_CTYPE="en_US.UTF-8" %python_exec setup.py test +%endif %files %{python_files} %defattr(-,root,root,-) %doc README.rst -%{python_sitelib}/argh -%{python_sitelib}/argh-%{version}-py%{python_version}.egg-info +%{python_sitelib}/argh/ +%{python_sitelib}/argh-%{version}-py*.egg-info %changelog