From a456184f9ed39d0e62a47e53dc3e9aaa20bd2c065bffd631a3508a3ea09f3851 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Tue, 31 Jul 2018 10:03:39 +0000 Subject: [PATCH] - Add multibuild to run tests in -test package OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools_scm?expand=0&rev=28 --- _multibuild | 3 +++ python-setuptools_scm.changes | 5 +++++ python-setuptools_scm.spec | 9 ++++++++- 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 _multibuild diff --git a/_multibuild b/_multibuild new file mode 100644 index 0000000..fcc7b97 --- /dev/null +++ b/_multibuild @@ -0,0 +1,3 @@ + + test + diff --git a/python-setuptools_scm.changes b/python-setuptools_scm.changes index e1e2bc0..e7ea205 100644 --- a/python-setuptools_scm.changes +++ b/python-setuptools_scm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Jul 31 10:03:17 UTC 2018 - tchvatal@suse.com + +- Add multibuild to run tests in -test package + ------------------------------------------------------------------- Tue Jul 31 09:12:41 UTC 2018 - tchvatal@suse.com diff --git a/python-setuptools_scm.spec b/python-setuptools_scm.spec index a3d67ae..37a82b1 100644 --- a/python-setuptools_scm.spec +++ b/python-setuptools_scm.spec @@ -17,7 +17,13 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define test 1 +%bcond_without test +%else %bcond_with test +%endif Name: python-setuptools_scm Version: 3.0.5 Release: 0 @@ -37,6 +43,7 @@ BuildRequires: %{python_module pip} BuildRequires: %{python_module pytest} BuildRequires: git BuildRequires: mercurial +Requires: this-is-only-for-build-envs %endif %if 0%{?suse_version} || 0%{?fedora_version} >= 24 Recommends: git @@ -60,7 +67,7 @@ in scm metadata. It also handles file finders for the supperted scm's. %if %{with test} %check -%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_bin_suffix} +%python_expand PYTHONPATH=%{buildroot}%{$python_sitelib} py.test-%{$python_bin_suffix} -v -k 'not (test_pip_download or test_old_setuptools_fails or test_old_setuptools_allows_with_warnings or test_distlib_setuptools_works)' %endif %files %{python_files}