forked from pool/python-packaging
Accepting request 990584 from home:bnavigator:branches:devel:languages:python
- Refine build and runtime requirements for primary and non-primary builds OBS-URL: https://build.opensuse.org/request/show/990584 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-packaging?expand=0&rev=61
This commit is contained in:
parent
f67e5a7180
commit
df900253f3
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jul 21 11:16:04 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Refine build and runtime requirements for primary and non-primary
|
||||||
|
builds
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Jul 15 12:30:44 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
Fri Jul 15 12:30:44 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
@ -17,26 +17,24 @@
|
|||||||
|
|
||||||
|
|
||||||
%define modname packaging
|
%define modname packaging
|
||||||
# this must be hardcoded until obs can read it from a prjconf definition
|
# fallback if primary_python is not available from the project configuration
|
||||||
%if 0%{suse_version} >= 1550
|
%{?!primary_python:%define primary_python python3%{?!sle_version:10}}
|
||||||
%define primary_python python310
|
|
||||||
%else
|
|
||||||
%define primary_python python3
|
|
||||||
%endif
|
|
||||||
# in order to avoid rewriting for subpackage generator
|
# in order to avoid rewriting for subpackage generator
|
||||||
%define mypython python
|
%define mypython python
|
||||||
%global flavor @BUILD_FLAVOR@%{nil}
|
%global flavor @BUILD_FLAVOR@%{nil}
|
||||||
%if "%{flavor}" == "primary"
|
%if "%{flavor}" == "primary"
|
||||||
# this one is built in Ring0
|
# this one is goes into Ring0
|
||||||
%define pprefix %{primary_python}
|
%define pprefix %{primary_python}
|
||||||
%define pythons %{primary_python}
|
%define pythons %{primary_python}
|
||||||
|
# Avoid cycle with python-rpm-packaging requiring python3-packaging
|
||||||
|
#!BuildIgnore: %{primary_python}-packaging
|
||||||
%endif
|
%endif
|
||||||
%if "%{flavor}" == ""
|
%if "%{flavor}" == ""
|
||||||
# The rest is in Ring1
|
# The rest is in Ring1
|
||||||
%define pprefix python
|
%define pprefix python
|
||||||
%if 0%{suse_version} >= 1550 || 0%{?sle_version} == 150500
|
%if 0%{suse_version} >= 1550 || 0%{?sle_version} == 150500
|
||||||
%{expand:%%define skip_%{primary_python} 1}
|
%{expand:%%define skip_%{primary_python} 1}
|
||||||
BuildRequires: python3-base >= 3.6
|
BuildRequires: python3-packaging
|
||||||
%else
|
%else
|
||||||
# no non-primary python in <=15.4
|
# no non-primary python in <=15.4
|
||||||
ExclusiveArch: do-not-build
|
ExclusiveArch: do-not-build
|
||||||
@ -51,6 +49,7 @@ ExclusiveArch: do-not-build
|
|||||||
%bcond_with test
|
%bcond_with test
|
||||||
%endif
|
%endif
|
||||||
%{?!python_module:%define python_module() python3-%{**}}
|
%{?!python_module:%define python_module() python3-%{**}}
|
||||||
|
%define skip_python2 1
|
||||||
Name: %{pprefix}-packaging%{?psuffix}
|
Name: %{pprefix}-packaging%{?psuffix}
|
||||||
Version: 21.3
|
Version: 21.3
|
||||||
Release: 0
|
Release: 0
|
||||||
@ -61,26 +60,26 @@ Source: https://files.pythonhosted.org/packages/source/p/packaging/packa
|
|||||||
# Fix testsuite on big-endian systems
|
# Fix testsuite on big-endian systems
|
||||||
# see: https://github.com/pypa/packaging/pull/538
|
# see: https://github.com/pypa/packaging/pull/538
|
||||||
Patch2: fix-big-endian-build.patch
|
Patch2: fix-big-endian-build.patch
|
||||||
BuildRequires: %{python_module base}
|
BuildRequires: %{python_module base >= 3.6}
|
||||||
BuildRequires: fdupes
|
BuildRequires: fdupes
|
||||||
BuildRequires: python-rpm-macros
|
BuildRequires: python-rpm-macros
|
||||||
#!BuildIgnore: post-build-checks-malwarescan
|
#!BuildIgnore: post-build-checks-malwarescan
|
||||||
#!BuildIgnore: python3-packaging
|
# ! Do not add setuptools build dependency here, so that the primary package can be in Ring0 !
|
||||||
# ! Do not add setuptools build dependency here, so that we can get this into Ring0 !
|
|
||||||
# ! Also make sure all runtime dependencies don't require setuptools. !
|
# ! Also make sure all runtime dependencies don't require setuptools. !
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
%if %{with test}
|
%if %{with test}
|
||||||
|
BuildRequires: %{python_module packaging = %{version}}
|
||||||
BuildRequires: %{python_module pretend}
|
BuildRequires: %{python_module pretend}
|
||||||
BuildRequires: %{python_module pyparsing >= 2.0.2}
|
|
||||||
BuildRequires: %{python_module pytest}
|
BuildRequires: %{python_module pytest}
|
||||||
%endif
|
%endif
|
||||||
|
%if "%{flavor}" == "primary"
|
||||||
# See boo#1186870, we can't provide ourselves to pythondistdeps.py
|
# See boo#1186870, we can't provide ourselves to pythondistdeps.py
|
||||||
Provides: %{mypython}%{python_version}dist(%{modname}) = %{version}-%{release}
|
Provides: %{mypython}%{python_version}dist(%{modname}) = %{version}-%{release}
|
||||||
%if "%{python_flavor}" == "python3" || "%{python_provides}" == "python3"
|
|
||||||
Provides: %{mypython}3dist(%{modname}) = %{version}-%{release}
|
|
||||||
Provides: %{mypython}3-%{modname} = %{version}-%{release}
|
Provides: %{mypython}3-%{modname} = %{version}-%{release}
|
||||||
|
Provides: %{mypython}3dist(%{modname}) = %{version}-%{release}
|
||||||
Obsoletes: %{mypython}3-%{modname} < %{version}-%{release}
|
Obsoletes: %{mypython}3-%{modname} < %{version}-%{release}
|
||||||
Requires: python3-pyparsing >= 2.0.2
|
Requires: %{primary_python}-pyparsing >= 2.0.2
|
||||||
|
Requires: %{mypython}(abi) = %{python_version}
|
||||||
%else
|
%else
|
||||||
Requires: python-pyparsing >= 2.0.2
|
Requires: python-pyparsing >= 2.0.2
|
||||||
%endif
|
%endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user