Fix bootstrap mode for packaging 22.0+
Necessary changes in spec file so packaging builds with new flit_core backend.
This commit is contained in:
parent
6b36dd46a4
commit
8378b5a677
@ -31,9 +31,10 @@ BuildArch: noarch
|
|||||||
|
|
||||||
BuildRequires: python%{python3_pkgversion}-devel
|
BuildRequires: python%{python3_pkgversion}-devel
|
||||||
BuildRequires: pyproject-rpm-macros
|
BuildRequires: pyproject-rpm-macros
|
||||||
|
BuildRequires: unzip
|
||||||
|
|
||||||
%if %{with bootstrap}
|
%if %{with bootstrap}
|
||||||
BuildRequires: python%{python3_pkgversion}-setuptools
|
BuildRequires: python%{python3_pkgversion}-flit-core
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Upstream uses nox for testing, we specify the test deps manually as well.
|
# Upstream uses nox for testing, we specify the test deps manually as well.
|
||||||
@ -89,7 +90,7 @@ sed -i '/html_theme = "furo"/d' docs/conf.py
|
|||||||
|
|
||||||
%build
|
%build
|
||||||
%if %{with bootstrap}
|
%if %{with bootstrap}
|
||||||
%py3_build
|
%{python3} -m flit_core.wheel
|
||||||
%else
|
%else
|
||||||
%pyproject_wheel
|
%pyproject_wheel
|
||||||
%endif
|
%endif
|
||||||
@ -106,7 +107,8 @@ rm -rf html/_static/fonts/
|
|||||||
|
|
||||||
%install
|
%install
|
||||||
%if %{with bootstrap}
|
%if %{with bootstrap}
|
||||||
%py3_install
|
mkdir -p %{buildroot}%{python3_sitelib}
|
||||||
|
unzip dist/packaging-%{version}-py3-none-any.whl -d %{buildroot}%{python3_sitelib} -x packaging-%{version}.dist-info/RECORD
|
||||||
echo '%{python3_sitelib}/packaging*' > %{pyproject_files}
|
echo '%{python3_sitelib}/packaging*' > %{pyproject_files}
|
||||||
%else
|
%else
|
||||||
%pyproject_install
|
%pyproject_install
|
||||||
@ -115,7 +117,7 @@ echo '%{python3_sitelib}/packaging*' > %{pyproject_files}
|
|||||||
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
%pyproject_check_import
|
%{!?with_bootstrap:%pyproject_check_import}
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
%pytest
|
%pytest
|
||||||
%endif
|
%endif
|
||||||
|
Loading…
Reference in New Issue
Block a user