From 34c9a60ce6ca7d6b01c2e688190f42bc032bb7c8b2d759020bcab25a2770274f Mon Sep 17 00:00:00 2001 From: Matej Cepl Date: Tue, 21 Feb 2023 07:23:42 +0000 Subject: [PATCH] Accepting request 1066922 from home:mcepl:branches:devel:languages:python Split package into _multibuild. OBS-URL: https://build.opensuse.org/request/show/1066922 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-hatch_vcs?expand=0&rev=11 --- _multibuild | 3 +++ python-hatch_vcs.spec | 23 ++++++++++++++++++----- 2 files changed, 21 insertions(+), 5 deletions(-) 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-hatch_vcs.spec b/python-hatch_vcs.spec index f9b7c93..ffeaf64 100644 --- a/python-hatch_vcs.spec +++ b/python-hatch_vcs.spec @@ -1,7 +1,7 @@ # -# spec file for package python-hatch_vcs +# spec file # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,9 +16,15 @@ # -%{?!python_module:%define python_module() python3-%{**}} -%define skip_python2 1 -Name: python-hatch_vcs +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define psuffix -test +%bcond_without test +%else +%define psuffix %{nil} +%bcond_with test +%endif +Name: python-hatch_vcs%{psuffix} Version: 0.3.0 Release: 0 Summary: Hatch plugin for versioning with your preferred VCS @@ -36,11 +42,13 @@ BuildArch: noarch BuildRequires: %{python_module hatchling >= 0.21.0} BuildRequires: %{python_module pip} # /SECTION +%if %{with test} # SECTION test BuildRequires: %{python_module setuptools_scm >= 6.4.0} BuildRequires: %{python_module pytest} BuildRequires: git # /SECTION +%endif %python_subpackages %description @@ -57,12 +65,17 @@ This provides a plugin for Hatch that uses your preferred version control system %python_expand %fdupes %{buildroot}%{$python_sitelib} %check +%if %{with test} %pytest tests +rm -rf %{buildroot} +%endif +%if %{without test} %files %{python_files} %license LICENSE.txt %doc README.md %{python_sitelib}/hatch_vcs %{python_sitelib}/hatch_vcs-%{version}*-info +%endif %changelog