From 54c90598146d6363458ffeeefb050f521c9ab9191d616e36f0f4d41a506b0288 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 9 Sep 2024 08:56:54 +0000 Subject: [PATCH] - split into test multibuild to avoid cycle over virtualenv OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-filelock?expand=0&rev=46 --- _multibuild | 3 +++ python-filelock.changes | 1 + python-filelock.spec | 23 ++++++++++++++++++----- 3 files changed, 22 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-filelock.changes b/python-filelock.changes index 77e8359..c57a6ad 100644 --- a/python-filelock.changes +++ b/python-filelock.changes @@ -12,6 +12,7 @@ Sun Sep 8 15:56:37 UTC 2024 - Dirk Müller keyword argument 'timeout'` - update to 3.15.2: * Use a metaclass to implement the singleton pattern +- split into test multibuild to avoid cycle over virtualenv ------------------------------------------------------------------- Mon Jun 17 06:00:15 UTC 2024 - Dirk Müller diff --git a/python-filelock.spec b/python-filelock.spec index 6de9507..c0e2bfc 100644 --- a/python-filelock.spec +++ b/python-filelock.spec @@ -17,8 +17,16 @@ # +%global flavor @BUILD_FLAVOR@%{nil} +%if "%{flavor}" == "test" +%define pkg_suffix -test +%bcond_without test +%else +%define pkg_suffix %{nil} +%bcond_with test +%endif %{?sle15_python_module_pythons} -Name: python-filelock +Name: python-filelock%{?pkg_suffix} Version: 3.16.0 Release: 0 Summary: Platform Independent File Lock in Python @@ -29,11 +37,13 @@ BuildRequires: %{python_module asyncio} BuildRequires: %{python_module hatch_vcs} BuildRequires: %{python_module hatchling} BuildRequires: %{python_module pip} +BuildRequires: %{python_module wheel} +%if %{with test} BuildRequires: %{python_module pytest-asyncio} BuildRequires: %{python_module pytest-mock} BuildRequires: %{python_module pytest} BuildRequires: %{python_module virtualenv} -BuildRequires: %{python_module wheel} +%endif BuildRequires: fdupes BuildRequires: python-rpm-macros %if 0%{?python_version_nodots} < 311 @@ -54,17 +64,20 @@ inter-process communication. %build %pyproject_wheel +%if !%{with test} %install %pyproject_install %python_expand %fdupes %{buildroot}/%{$python_sitelib} -%check -%pytest -rs - %files %{python_files} %doc README.md %license LICENSE %{python_sitelib}/filelock %{python_sitelib}/filelock-%{version}*-info +%else + +%check +%pytest -rs +%endif %changelog