From db3e2914ddcc6b0745e429a2b2f15c833c5552af78748fafda257ec511ea0249 Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Wed, 30 May 2018 20:35:06 +0000 Subject: [PATCH] Accepting request 613122 from home:mcepl:work Do not package tests/ directory OBS-URL: https://build.opensuse.org/request/show/613122 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyshould?expand=0&rev=3 --- python-pyshould.changes | 5 +++++ python-pyshould.spec | 24 ++++++++++++++---------- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/python-pyshould.changes b/python-pyshould.changes index 41415a6..d02e4cb 100644 --- a/python-pyshould.changes +++ b/python-pyshould.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed May 30 20:33:58 UTC 2018 - mcepl@suse.com + +- Do not package tests/ directory + ------------------------------------------------------------------- Wed May 16 15:38:06 UTC 2018 - toddrme2178@gmail.com diff --git a/python-pyshould.spec b/python-pyshould.spec index 1924184..4a3a8b6 100644 --- a/python-pyshould.spec +++ b/python-pyshould.spec @@ -13,28 +13,29 @@ # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ +# +%define modname pyshould %{?!python_module:%define python_module() python-%{**} python3-%{**}} -Name: python-pyshould +Name: python-%{modname} Version: 0.7.1 Release: 0 -License: MIT Summary: Should style asserts -Url: https://github.com/drslump/pyshould +License: MIT Group: Development/Languages/Python -Source: https://files.pythonhosted.org/packages/source/p/pyshould/pyshould-%{version}.tar.gz +URL: https://github.com/drslump/%{modname} +Source: https://files.pythonhosted.org/packages/source/p/pyshould/%{modname}-%{version}.tar.gz BuildRequires: %{python_module devel} BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros +Requires: python-hamcrest +BuildArch: noarch # SECTION test requirements BuildRequires: %{python_module hamcrest} BuildRequires: %{python_module nose} # /SECTION -Requires: python-hamcrest -BuildArch: noarch - %python_subpackages %description @@ -52,21 +53,24 @@ to the unit testing runner used, since mismatches are reported using the standard AssertionError. %prep -%setup -q -n pyshould-%{version} +%setup -q -n %{modname}-%{version} %build %python_build %install %python_install +# We shouldn't install tests +%python_expand rm -rvf %{buildroot}%{$python_sitelib}/tests + %python_expand %fdupes %{buildroot}%{$python_sitelib} %check -%python_exec setup.py test +%python_exec setup.py test -v %files %{python_files} %doc README.md %license LICENSE -%{python_sitelib}/* +%{python_sitelib}/%{modname}* %changelog