|
|
162b0ca |
%pyproject_wheel() %{expand:\\\
|
|
|
fdf5116 |
CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}" \\\
|
|
|
fdf5116 |
%{__python3} -m pip wheel --no-deps --use-pep517 --no-build-isolation --disable-pip-version-check --progress-bar off --verbose .
|
|
|
162b0ca |
}
|
|
|
162b0ca |
|
|
|
162b0ca |
|
|
|
162b0ca |
%pyproject_install() %{expand:\\\
|
|
|
a94281a |
%{__python3} -m pip install --root %{buildroot} --strip-file-prefix %{buildroot} --no-deps --disable-pip-version-check --progress-bar off --verbose --ignore-installed --no-warn-script-location ./*.whl
|
|
|
fdf5116 |
if [ -d %{buildroot}%{_bindir} ]; then
|
|
|
253976c |
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{_bindir}/*
|
|
|
162b0ca |
fi
|
|
|
fdf5116 |
if [ -d %{buildroot}%{python3_sitelib} ]; then
|
|
|
fdf5116 |
sed -i 's/pip/rpm/' %{buildroot}%{python3_sitelib}/*.dist-info/INSTALLER
|
|
|
253976c |
fi
|
|
|
fdf5116 |
if [ -d %{buildroot}%{python3_sitearch} ]; then
|
|
|
fdf5116 |
sed -i 's/pip/rpm/' %{buildroot}%{python3_sitearch}/*.dist-info/INSTALLER
|
|
|
fdf5116 |
fi
|
|
|
fdf5116 |
}
|
|
|
fdf5116 |
|
|
|
d6e6bb7 |
%pyproject_buildrequires(rx:) %{expand:\\\
|
|
|
fdf5116 |
echo 'python3-devel'
|
|
|
fdf5116 |
echo 'python3dist(packaging)'
|
|
|
fdf5116 |
echo 'python3dist(pip) >= 19'
|
|
|
fdf5116 |
echo 'python3dist(pytoml)'
|
|
|
bc156c4 |
# setuptools assumes no pre-existing dist-info
|
|
|
bc156c4 |
rm -rfv *.dist-info/
|
|
|
fdf5116 |
if [ -f %{__python3} ]; then
|
|
|
bc156c4 |
%{__python3} -I %{_rpmconfigdir}/redhat/pyproject_buildrequires.py %{?**}
|
|
|
162b0ca |
fi
|
|
|
162b0ca |
}
|