Switch to %pyproject_wheel and %pyproject_install macros
This commit is contained in:
parent
8f4cf57888
commit
837ae06101
@ -20,6 +20,7 @@ Source1: https://pypi.org/pypi?%3Aaction=list_classifiers#/classifiers.lst
|
|||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: pyproject-rpm-macros
|
||||||
BuildRequires: python3-pip
|
BuildRequires: python3-pip
|
||||||
BuildRequires: python3-requests
|
BuildRequires: python3-requests
|
||||||
BuildRequires: python3-docutils
|
BuildRequires: python3-docutils
|
||||||
@ -86,22 +87,17 @@ at flit_core.buildapi.
|
|||||||
export FLIT_NO_NETWORK=1
|
export FLIT_NO_NETWORK=1
|
||||||
|
|
||||||
# first, build flit_core with self
|
# first, build flit_core with self
|
||||||
# TODO do it in a less hacky way, this is reconstructed from pyoroject.toml
|
|
||||||
cd flit_core
|
cd flit_core
|
||||||
PYTHONPATH=$PWD %{python3} -c 'from flit_core.build_thyself import build_wheel; build_wheel(".")'
|
%pyproject_wheel
|
||||||
|
# Move %%{_pyproject_wheeldir}/flit_core wheel to the main dir
|
||||||
# %%py3_install_wheel unfortunately hardcodes installing from dist/
|
mv %{_pyproject_wheeldir} ..
|
||||||
mkdir ../dist
|
|
||||||
mv flit_core-%{version}-py2.py3-none-any.whl ../dist
|
|
||||||
cd -
|
cd -
|
||||||
|
|
||||||
PYTHONPATH=$PWD:$PWD/flit_core %{python3} -m flit build --format wheel
|
# build of the main flit (needs flit_core)
|
||||||
|
PYTHONPATH=$PWD:$PWD/flit_core %pyproject_wheel
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%py3_install_wheel flit_core-%{version}-py2.py3-none-any.whl
|
%pyproject_install
|
||||||
%py3_install_wheel flit-%{version}-py3-none-any.whl
|
|
||||||
|
|
||||||
|
|
||||||
%if %{with tests}
|
%if %{with tests}
|
||||||
%check
|
%check
|
||||||
|
Loading…
Reference in New Issue
Block a user