3
0

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
This commit is contained in:
Benjamin Greiner 2021-10-15 19:31:28 +00:00 committed by Git OBS Bridge
parent c54c411b65
commit 60f81d0e04
2 changed files with 17 additions and 6 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Oct 15 19:27:43 UTC 2021 - Ben Greiner <code@bnavigator.de>
- 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 <code@bnavigator.de>

View File

@ -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}