Remove stray __pycache__ directory from /usr/bin when running %pyproject_install

Solves bz#1739848
This commit is contained in:
Anna Khaitovich 2019-11-13 12:41:31 +01:00
parent 50464a4b19
commit 8cce1fad47
2 changed files with 5 additions and 1 deletions

View File

@ -8,6 +8,7 @@ CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}" \\\
%{__python3} -m pip install --root %{buildroot} --no-deps --disable-pip-version-check --progress-bar off --verbose --ignore-installed --no-warn-script-location ./*.whl
if [ -d %{buildroot}%{_bindir} ]; then
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{_bindir}/*
rm -rfv %{buildroot}%{_bindir}/__pycache__
fi
if [ -d %{buildroot}%{python3_sitelib} ]; then
sed -i 's/pip/rpm/' %{buildroot}%{python3_sitelib}/*.dist-info/INSTALLER

View File

@ -6,7 +6,7 @@ License: MIT
# Keep the version at zero and increment only release
Version: 0
Release: 8%{?dist}
Release: 9%{?dist}
Source0: macros.pyproject
Source1: pyproject_buildrequires.py
@ -87,6 +87,9 @@ install -m 644 pyproject_buildrequires.py %{buildroot}%{_rpmconfigdir}/redhat/
%license LICENSE
%changelog
* Wed Nov 13 2019 Anna Khaitovich <akhaitov@redhat.com> - 0-9
- Remove stray __pycache__ directory from /usr/bin when running %%pyproject_install
* Fri Oct 25 2019 Miro Hrončok <mhroncok@redhat.com> - 0-8
- When tox fails, print tox output before failing