pyproject-rpm-macros/macros.pyproject
Miro Hrončok a94281a5df %pyproject_install: Add --no-warn-script-location
Otherwise you see:

    WARNING: The scripts py.test and pytest are installed in '/builddir/build/BUILDROOT/pytest-4.6.4-1.fc31.x86_64/usr/bin' which is not on PATH.
      Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.

And that is not relevant for us.
2019-07-02 13:58:24 +02:00

19 lines
863 B
Plaintext

%pyproject_wheel() %{expand:\\\
CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}" \\\
%{__python3} -m pip wheel --no-deps --use-pep517 --no-build-isolation --disable-pip-version-check --progress-bar off --verbose .
}
%pyproject_install() %{expand:\\\
%{__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
if [ -e %{buildroot}%{_bindir} ]; then
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{_bindir}/*
fi
if [ -e %{buildroot}%{python3_sitelib}]; then
sed -i -e 's/pip/rpm/g' %{buildroot}%{python3_sitelib}/*.dist-info/INSTALLER
fi
if [ -e %{buildroot}{python3_sitearch}]; then
sed -i -e 's/pip/rpm/g' %{buildroot}%{python3_sitearch}/*.dist-info/INSTALLER
fi
}