Accepting request 989424 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/989424 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flit-core?expand=0&rev=24
This commit is contained in:
parent
0fb345f613
commit
56b1b95ed2
@ -1,3 +1,4 @@
|
|||||||
<multibuild>
|
<multibuild>
|
||||||
|
<package>primary</package>
|
||||||
<package>test</package>
|
<package>test</package>
|
||||||
</multibuild>
|
</multibuild>
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Thu Jul 14 22:27:53 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Split primary flavor in multibuild for possible inclusion into
|
||||||
|
Ring0
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Jul 14 15:34:09 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
Thu Jul 14 15:34:09 UTC 2022 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
@ -16,17 +16,39 @@
|
|||||||
#
|
#
|
||||||
|
|
||||||
|
|
||||||
|
# this must be hardcoded until obs can read it from a prjconf definition
|
||||||
|
%if 0%{suse_version} >= 1550
|
||||||
|
%define primary_python python310
|
||||||
|
%else
|
||||||
|
%define primary_python python3
|
||||||
|
%endif
|
||||||
%global flavor @BUILD_FLAVOR@%{nil}
|
%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"
|
%if "%{flavor}" == "test"
|
||||||
|
%define pprefix python
|
||||||
%define psuffix -test
|
%define psuffix -test
|
||||||
%bcond_without test
|
%bcond_without test
|
||||||
%else
|
%else
|
||||||
%define psuffix %{nil}
|
|
||||||
%bcond_with test
|
%bcond_with test
|
||||||
%endif
|
%endif
|
||||||
%{?!python_module:%define python_module() python3-%{**}}
|
|
||||||
%define skip_python2 1
|
Name: %{pprefix}-flit-core%{?psuffix}
|
||||||
Name: python-flit-core%{psuffix}
|
|
||||||
Version: 3.7.1
|
Version: 3.7.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: Distribution-building parts of Flit
|
Summary: Distribution-building parts of Flit
|
||||||
@ -51,11 +73,11 @@ The only public interface is the API specified by PEP 517, at flit_core.buildapi
|
|||||||
%prep
|
%prep
|
||||||
%setup -q -n flit_core-%{version}
|
%setup -q -n flit_core-%{version}
|
||||||
|
|
||||||
|
%if !%{with test}
|
||||||
%build
|
%build
|
||||||
# https://flit.readthedocs.io/en/latest/bootstrap.html
|
# https://flit.readthedocs.io/en/latest/bootstrap.html
|
||||||
python3 -m flit_core.wheel
|
python3 -m flit_core.wheel
|
||||||
|
|
||||||
%if !%{with test}
|
|
||||||
%install
|
%install
|
||||||
%{python_expand #
|
%{python_expand #
|
||||||
mkdir -p %{buildroot}%{$python_sitelib}
|
mkdir -p %{buildroot}%{$python_sitelib}
|
||||||
@ -69,7 +91,7 @@ rm -r %{buildroot}%{$python_sitelib}/flit_core/tests
|
|||||||
|
|
||||||
%if %{with test}
|
%if %{with test}
|
||||||
%check
|
%check
|
||||||
# make sure we do not test the sources but the debundled package
|
# make sure we do not test the sources but the package
|
||||||
rm flit_core/*.py pyproject.toml
|
rm flit_core/*.py pyproject.toml
|
||||||
%pytest -rfEs
|
%pytest -rfEs
|
||||||
%endif
|
%endif
|
||||||
|
Loading…
Reference in New Issue
Block a user