From 0fb345f613ea2069c64c8177e9ab1135478ae0a1ae99febb0ac1589765541cff Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Thu, 14 Jul 2022 15:37:36 +0000 Subject: [PATCH 1/6] Accepting request 989208 from home:bnavigator:branches:devel:languages:python - Remove devendoring of tomli, so that we can put this in Ring0 OBS-URL: https://build.opensuse.org/request/show/989208 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flit-core?expand=0&rev=23 --- python-flit-core.changes | 5 +++++ python-flit-core.spec | 10 +++------- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/python-flit-core.changes b/python-flit-core.changes index a628792..3dfdf89 100644 --- a/python-flit-core.changes +++ b/python-flit-core.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Thu Jul 14 15:34:09 UTC 2022 - Ben Greiner + +- Remove devendoring of tomli, so that we can put this in Ring0 + ------------------------------------------------------------------- Fri Mar 25 12:10:11 UTC 2022 - Ben Greiner diff --git a/python-flit-core.spec b/python-flit-core.spec index eddb46a..28f0873 100644 --- a/python-flit-core.spec +++ b/python-flit-core.spec @@ -30,7 +30,7 @@ Name: python-flit-core%{psuffix} Version: 3.7.1 Release: 0 Summary: Distribution-building parts of Flit -License: BSD-3-Clause +License: BSD-3-Clause AND MIT URL: https://github.com/pypa/flit Source0: https://files.pythonhosted.org/packages/source/f/flit-core/flit_core-%{version}.tar.gz BuildRequires: %{python_module base >= 3.6} @@ -41,13 +41,12 @@ BuildRequires: %{python_module testpath} %endif BuildRequires: fdupes BuildRequires: python-rpm-macros -BuildRequires: unzip -Requires: python-tomli BuildArch: noarch %python_subpackages %description -Flit is a simple way to put Python packages and modules on PyPI. +This provides a PEP 517 build backend for packages using Flit. +The only public interface is the API specified by PEP 517, at flit_core.buildapi. %prep %setup -q -n flit_core-%{version} @@ -61,9 +60,6 @@ python3 -m flit_core.wheel %{python_expand # mkdir -p %{buildroot}%{$python_sitelib} $python bootstrap_install.py dist/flit_core-%{version}-py3-none-any.whl -i %{buildroot}%{$python_sitelib} -# debundle after the bootstrap. See vendor/README -sed -i 's/from .vendor import tomli/import tomli/' %{buildroot}%{$python_sitelib}/flit_core/config.py -rm -r %{buildroot}%{$python_sitelib}/flit_core/vendor # Don't package the tests rm -r %{buildroot}%{$python_sitelib}/flit_core/tests } From 56b1b95ed28e9931fe5c23e35f8afb71f271cb9eae425d7a2cec802994238ee6 Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Fri, 15 Jul 2022 12:05:09 +0000 Subject: [PATCH 2/6] 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 --- _multibuild | 1 + python-flit-core.changes | 6 ++++++ python-flit-core.spec | 34 ++++++++++++++++++++++++++++------ 3 files changed, 35 insertions(+), 6 deletions(-) diff --git a/_multibuild b/_multibuild index fcc7b97..9e55412 100644 --- a/_multibuild +++ b/_multibuild @@ -1,3 +1,4 @@ + primary test diff --git a/python-flit-core.changes b/python-flit-core.changes index 3dfdf89..951839d 100644 --- a/python-flit-core.changes +++ b/python-flit-core.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Jul 14 22:27:53 UTC 2022 - Ben Greiner + +- Split primary flavor in multibuild for possible inclusion into + Ring0 + ------------------------------------------------------------------- Thu Jul 14 15:34:09 UTC 2022 - Ben Greiner diff --git a/python-flit-core.spec b/python-flit-core.spec index 28f0873..b4e76c9 100644 --- a/python-flit-core.spec +++ b/python-flit-core.spec @@ -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} +%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 -%define psuffix %{nil} %bcond_with test %endif -%{?!python_module:%define python_module() python3-%{**}} -%define skip_python2 1 -Name: python-flit-core%{psuffix} + +Name: %{pprefix}-flit-core%{?psuffix} Version: 3.7.1 Release: 0 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 %setup -q -n flit_core-%{version} +%if !%{with test} %build # https://flit.readthedocs.io/en/latest/bootstrap.html python3 -m flit_core.wheel -%if !%{with test} %install %{python_expand # mkdir -p %{buildroot}%{$python_sitelib} @@ -69,7 +91,7 @@ rm -r %{buildroot}%{$python_sitelib}/flit_core/tests %if %{with test} %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 %pytest -rfEs %endif From 90fbf5960c207903b2bafdde048ebe37902d9a30525a4ef7ebbae1b210771204 Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Fri, 15 Jul 2022 13:02:15 +0000 Subject: [PATCH 3/6] Accepting request 989439 from home:bnavigator:branches:devel:languages:python . OBS-URL: https://build.opensuse.org/request/show/989439 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flit-core?expand=0&rev=25 --- python-flit-core.spec | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/python-flit-core.spec b/python-flit-core.spec index b4e76c9..ef1bd54 100644 --- a/python-flit-core.spec +++ b/python-flit-core.spec @@ -16,6 +16,8 @@ # +%define modname flit-core +%define mypython python # this must be hardcoded until obs can read it from a prjconf definition %if 0%{suse_version} >= 1550 %define primary_python python310 @@ -64,6 +66,13 @@ BuildRequires: %{python_module testpath} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch +# SECTION boo#1186870: we are a transitive build dependency of python-packaging which is used by pythondistdeps.py normally creating this entry +#!BuildIgnore: python3-packaging +Provides: %{mypython}%{python_version}dist(%{modname}) = %{version} +%if "%{python_flavor}" == "python3" || "%{python_provides}" == "python3" +Provides: %{mypython}3dist(%{modname}) = %{version} +%endif +# /SECTION %python_subpackages %description From e6b564f974e68f4fa2332c5e6d51cf4b01e04ad34b4c85aa85ed3bf3c2b0bb71 Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Fri, 15 Jul 2022 13:48:42 +0000 Subject: [PATCH 4/6] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flit-core?expand=0&rev=26 --- python-flit-core.spec | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python-flit-core.spec b/python-flit-core.spec index ef1bd54..f26c8e3 100644 --- a/python-flit-core.spec +++ b/python-flit-core.spec @@ -71,6 +71,8 @@ BuildArch: noarch Provides: %{mypython}%{python_version}dist(%{modname}) = %{version} %if "%{python_flavor}" == "python3" || "%{python_provides}" == "python3" Provides: %{mypython}3dist(%{modname}) = %{version} +Provides: %{mypython}3-%{modname} = %{version}-%{release} +Obsoletes: %{mypython}3-%{modname} < %{version}-%{release} %endif # /SECTION %python_subpackages From 96cdc458d72ed5594d81afc832b64f95351e8ba426cdfe207293438668adf760 Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Tue, 2 Aug 2022 19:03:09 +0000 Subject: [PATCH 5/6] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flit-core?expand=0&rev=27 --- python-flit-core.spec | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/python-flit-core.spec b/python-flit-core.spec index f26c8e3..e63eb08 100644 --- a/python-flit-core.spec +++ b/python-flit-core.spec @@ -18,12 +18,8 @@ %define modname flit-core %define mypython python -# 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 +# fallback if primary_python is not available from the project configuration +%{?!primary_python:%define primary_python python3%{?!sle_version:10}} %global flavor @BUILD_FLAVOR@%{nil} %if "%{flavor}" == "primary" # this one is built in Ring0 @@ -33,7 +29,7 @@ %if "%{flavor}" == "" # The rest is in Ring1 %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} BuildRequires: python3-base >= 3.6 %else @@ -68,6 +64,7 @@ BuildRequires: python-rpm-macros BuildArch: noarch # SECTION boo#1186870: we are a transitive build dependency of python-packaging which is used by pythondistdeps.py normally creating this entry #!BuildIgnore: python3-packaging +#!BuildIgnore: %{primary_python}-packaging Provides: %{mypython}%{python_version}dist(%{modname}) = %{version} %if "%{python_flavor}" == "python3" || "%{python_provides}" == "python3" Provides: %{mypython}3dist(%{modname}) = %{version} From ec7a263260f2240c613efb663b7264f34a418a29e638795f0b8ae64038070e90 Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Tue, 2 Aug 2022 19:03:36 +0000 Subject: [PATCH 6/6] OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flit-core?expand=0&rev=28 --- python-flit-core.changes | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/python-flit-core.changes b/python-flit-core.changes index 951839d..9c80c93 100644 --- a/python-flit-core.changes +++ b/python-flit-core.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Aug 2 19:03:15 UTC 2022 - Ben Greiner + +- Use prjconf provided primary_python if available + ------------------------------------------------------------------- Thu Jul 14 22:27:53 UTC 2022 - Ben Greiner