From 60f81d0e0458fc99c29637fa6e608d59cafa9d94ac7678cd6d91e170663de29d Mon Sep 17 00:00:00 2001 From: Benjamin Greiner Date: Fri, 15 Oct 2021 19:31:28 +0000 Subject: [PATCH] Accepting request 925547 from home:bnavigator:branches:devel:languages:python - Break build cycle by using upstream recommended bootstrap method https://flit.readthedocs.io/en/latest/bootstrap.html OBS-URL: https://build.opensuse.org/request/show/925547 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flit-core?expand=0&rev=17 --- python-flit-core.changes | 6 ++++++ python-flit-core.spec | 17 +++++++++++------ 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/python-flit-core.changes b/python-flit-core.changes index 387bd65..2f71847 100644 --- a/python-flit-core.changes +++ b/python-flit-core.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Oct 15 19:27:43 UTC 2021 - Ben Greiner + +- Break build cycle by using upstream recommended bootstrap method + https://flit.readthedocs.io/en/latest/bootstrap.html + ------------------------------------------------------------------- Fri Oct 15 17:32:51 UTC 2021 - Ben Greiner diff --git a/python-flit-core.spec b/python-flit-core.spec index 408db70..5fe4242 100644 --- a/python-flit-core.spec +++ b/python-flit-core.spec @@ -26,14 +26,14 @@ %endif %{?!python_module:%define python_module() python3-%{**}} %define skip_python2 1 -Name: python-flit-core%{nil} +Name: python-flit-core%{psuffix} Version: 3.4.0 Release: 0 Summary: Distribution-building parts of Flit License: BSD-3-Clause URL: https://github.com/takluyver/flit Source: https://files.pythonhosted.org/packages/source/f/flit-core/flit_core-%{version}.tar.gz -BuildRequires: %{python_module pip} +BuildRequires: %{python_module base >= 3.6} %if %{with test} BuildRequires: %{python_module pytest} BuildRequires: %{python_module testpath} @@ -41,6 +41,7 @@ BuildRequires: %{python_module tomli} %endif BuildRequires: fdupes BuildRequires: python-rpm-macros +BuildRequires: unzip Requires: python-tomli BuildArch: noarch %python_subpackages @@ -52,14 +53,18 @@ Flit is a simple way to put Python packages and modules on PyPI. %setup -q -n flit_core-%{version} %build -%pyproject_wheel +# https://flit.readthedocs.io/en/latest/bootstrap.html +python3 build_dists.py %if !%{with test} %install -%pyproject_install -%{python_expand rm -r %{buildroot}%{$python_sitelib}/flit_core/tests -%fdupes %{buildroot}%{$python_sitelib} +%{python_expand # do manually what pip would do +mkdir -p %{buildroot}%{$python_sitelib} +unzip dist/flit_core-%{version}-py3-none-any.whl -d %{buildroot}%{$python_sitelib} +rm -r %{buildroot}%{$python_sitelib}/flit_core/tests } +%python_compileall +%python_expand %fdupes %{buildroot}%{$python_sitelib} %endif %if %{with test}