14
0

- Split package into multibuild to avoid a build cycle.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-referencing?expand=0&rev=4
This commit is contained in:
2023-03-28 09:12:49 +00:00
committed by Git OBS Bridge
parent d52677aa37
commit 4718347f5f
3 changed files with 26 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
#
# spec file for package python-referencing
# spec file
#
# Copyright (c) 2023 SUSE LLC
#
@@ -16,7 +16,15 @@
#
Name: python-referencing
%global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "test"
%define psuffix -test
%bcond_without test
%else
%define psuffix %{nil}
%bcond_with test
%endif
Name: python-referencing%{psuffix}
Version: 0.26.4
Release: 0
Summary: JSON Referencing + Python
@@ -36,6 +44,7 @@ BuildRequires: %{python_module setuptools_scm}
BuildRequires: %{python_module setuptools}
BuildRequires: git-core
BuildRequires: python-rpm-macros
%if %{with test}
# SECTION test requirements
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module attrs >= 22.2.0}
@@ -44,6 +53,7 @@ BuildRequires: %{python_module jsonschema}
BuildRequires: %{python_module pytest-subtests}
BuildRequires: %{python_module rpds-py >= 0.7.0}
# /SECTION
%endif
BuildRequires: fdupes
Requires: python-attrs >= 22.2.0
Requires: python-rpds-py >= 0.7.0
@@ -60,16 +70,22 @@ JSON Referencing + Python
%pyproject_wheel
%install
%if %{without test}
%pyproject_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}
%endif
%check
%if %{with test}
%pytest
%endif
%if %{without test}
%files %{python_files}
%doc CHANGELOG.rst README.rst
%license COPYING
%{python_sitelib}/referencing/
%{python_sitelib}/referencing-%{version}.dist-info/
%endif
%changelog