- switch to multibuild for avoiding testing cycle with

pytest-shell-utilities

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-setuptools-declarative-requirements?expand=0&rev=7
This commit is contained in:
2024-02-07 09:20:20 +00:00
committed by Git OBS Bridge
parent f458f3d986
commit d3fba65010
3 changed files with 39 additions and 15 deletions

3
_multibuild Normal file
View File

@@ -0,0 +1,3 @@
<multibuild>
<package>test</package>
</multibuild>

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Feb 7 09:19:48 UTC 2024 - Dirk Müller <dmueller@suse.com>
- switch to multibuild for avoiding testing cycle with
pytest-shell-utilities
-------------------------------------------------------------------
Mon Jan 15 21:37:18 UTC 2024 - Dirk Müller <dmueller@suse.com>

View File

@@ -16,30 +16,41 @@
#
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
%{?sle15_python_module_pythons}
Name: python-setuptools-declarative-requirements
Name: python-setuptools-declarative-requirements%{psuffix}
Version: 1.3.0
Release: 0
Summary: File support for setuptools declarative setup.cfg
License: Apache-2.0
URL: https://github.com/s0undt3ch/setuptools-declarative-requirements
Source: https://files.pythonhosted.org/packages/source/s/setuptools-declarative-requirements/setuptools-declarative-requirements-%{version}.tar.gz
BuildRequires: %{python_module pip}
BuildRequires: %{python_module setuptools_scm >= 3.4}
BuildRequires: %{python_module setuptools}
BuildRequires: python-rpm-macros
# SECTION test requirements
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module pypiserver}
BuildRequires: %{python_module pytest-shell-utilities}
BuildRequires: %{python_module toml}
BuildRequires: %{python_module virtualenv}
BuildRequires: %{python_module wheel}
# /SECTION
BuildRequires: fdupes
BuildRequires: python-rpm-macros
Requires: python-setuptools
Requires: python-toml
Requires: python-wheel
BuildArch: noarch
# SECTION test requirements
%if %{with test}
BuildRequires: %{python_module pypiserver}
BuildRequires: %{python_module pytest-shell-utilities}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module toml}
BuildRequires: %{python_module virtualenv}
%endif
# /SECTION
%python_subpackages
%description
@@ -50,19 +61,23 @@ File support for setuptools declarative setup.cfg.
sed -i 's/"setuptools>=[0-9]*"/"setuptools"/g' tests/conftest.py
%build
%python_build
%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%pyproject_wheel
%if %{with test}
%check
# sdist test tries to contact pypi.org
%pytest -k 'not sdist'
%else
%install
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%files %{python_files}
%doc CHANGELOG.md README.md
%license LICENSE
%{python_sitelib}/*
%{python_sitelib}/declarative_requirements
%{python_sitelib}/setuptools_declarative_requirements-%{version}.dist-info
%endif
%changelog