forked from pool/python-packaging
Accepting request 989455 from home:bnavigator:branches:devel:languages:python
- Split primary flavor in multibuild for possible inclusion into Ring0 OBS-URL: https://build.opensuse.org/request/show/989455 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-packaging?expand=0&rev=60
This commit is contained in:
parent
f434ab2916
commit
f67e5a7180
@ -1,3 +1,4 @@
|
||||
<multibuild>
|
||||
<package>test</package>
|
||||
<package>primary</package>
|
||||
</multibuild>
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Jul 15 12:30:44 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
- Split primary flavor in multibuild for possible inclusion into
|
||||
Ring0
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Jul 14 13:13:54 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||
|
||||
|
@ -16,19 +16,42 @@
|
||||
#
|
||||
|
||||
|
||||
%{?!python_module:%define python_module() python3-%{**}}
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%if "%{flavor}" == "test"
|
||||
%define psuffix -test
|
||||
%bcond_without test
|
||||
%define modname packaging
|
||||
# this must be hardcoded until obs can read it from a prjconf definition
|
||||
%if 0%{suse_version} >= 1550
|
||||
%define primary_python python310
|
||||
%else
|
||||
%define psuffix %{nil}
|
||||
%bcond_with test
|
||||
%define primary_python python3
|
||||
%endif
|
||||
# in order to avoid rewriting for subpackage generator
|
||||
%define mypython python
|
||||
%define skip_python2 1
|
||||
Name: python-packaging%{psuffix}
|
||||
%global flavor @BUILD_FLAVOR@%{nil}
|
||||
%if "%{flavor}" == "primary"
|
||||
# this one is built in Ring0
|
||||
%define pprefix %{primary_python}
|
||||
%define pythons %{primary_python}
|
||||
%endif
|
||||
%if "%{flavor}" == ""
|
||||
# The rest is in Ring1
|
||||
%define pprefix python
|
||||
%if 0%{suse_version} >= 1550 || 0%{?sle_version} == 150500
|
||||
%{expand:%%define skip_%{primary_python} 1}
|
||||
BuildRequires: python3-base >= 3.6
|
||||
%else
|
||||
# no non-primary python in <=15.4
|
||||
ExclusiveArch: do-not-build
|
||||
%define python_module() no-build-without-multibuild-flavor
|
||||
%endif
|
||||
%endif
|
||||
%if "%{flavor}" == "test"
|
||||
%define pprefix python
|
||||
%define psuffix -test
|
||||
%bcond_without test
|
||||
%else
|
||||
%bcond_with test
|
||||
%endif
|
||||
%{?!python_module:%define python_module() python3-%{**}}
|
||||
Name: %{pprefix}-packaging%{?psuffix}
|
||||
Version: 21.3
|
||||
Release: 0
|
||||
Summary: Core utilities for Python packages
|
||||
@ -42,9 +65,9 @@ BuildRequires: %{python_module base}
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: python-rpm-macros
|
||||
#!BuildIgnore: post-build-checks-malwarescan
|
||||
#!BuildIgnore: python3-packaging
|
||||
# ! 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. !
|
||||
Requires: python-pyparsing >= 2.0.2
|
||||
BuildArch: noarch
|
||||
%if %{with test}
|
||||
BuildRequires: %{python_module pretend}
|
||||
@ -52,9 +75,14 @@ BuildRequires: %{python_module pyparsing >= 2.0.2}
|
||||
BuildRequires: %{python_module pytest}
|
||||
%endif
|
||||
# See boo#1186870, we can't provide ourselves to pythondistdeps.py
|
||||
Provides: %{mypython}%{python_version}dist(packaging) = %{version}-%{release}
|
||||
Provides: %{mypython}%{python_version}dist(%{modname}) = %{version}-%{release}
|
||||
%if "%{python_flavor}" == "python3" || "%{python_provides}" == "python3"
|
||||
Provides: %{mypython}3dist(packaging) = %{version}-%{release}
|
||||
Provides: %{mypython}3dist(%{modname}) = %{version}-%{release}
|
||||
Provides: %{mypython}3-%{modname} = %{version}-%{release}
|
||||
Obsoletes: %{mypython}3-%{modname} < %{version}-%{release}
|
||||
Requires: python3-pyparsing >= 2.0.2
|
||||
%else
|
||||
Requires: python-pyparsing >= 2.0.2
|
||||
%endif
|
||||
%python_subpackages
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user