Accepting request 1003985 from devel:languages:python

OBS-URL: https://build.opensuse.org/request/show/1003985
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pyparsing?expand=0&rev=43
This commit is contained in:
Dominique Leuenberger 2022-09-17 18:08:25 +00:00 committed by Git OBS Bridge
commit 39ab8e5a5c
2 changed files with 18 additions and 3 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Sep 15 22:00:29 UTC 2022 - Ben Greiner <code@bnavigator.de>
- Fix incorrect usage of non-bundled pip revealed by
python-rpm-macros update.
------------------------------------------------------------------- -------------------------------------------------------------------
Fri Jul 15 12:23:12 UTC 2022 - Ben Greiner <code@bnavigator.de> Fri Jul 15 12:23:12 UTC 2022 - Ben Greiner <code@bnavigator.de>

View File

@ -84,16 +84,25 @@ code uses to construct the grammar directly in Python code.
%if !%{with test} %if !%{with test}
%build %build
%{python_expand # use pythonXX-base bundled pip as PEP517 frontend for flit-core %{python_expand # use pythonXX-base bundled pip as PEP517 frontend for flit-core for every flavor to install
mkdir -p build mkdir -p build
$python -m venv build/buildenv --system-site-packages $python -m venv build/buildenv --system-site-packages
} }
# building pure wheel once is enough
export PATH=$PWD/build/buildenv/bin:$PATH export PATH=$PWD/build/buildenv/bin:$PATH
%pyproject_wheel python -mpip wheel --verbose --progress-bar off \
--disable-pip-version-check --use-pep517 --no-build-isolation \
--no-deps --wheel-dir ./dist .
%install %install
export PATH=$PWD/build/buildenv/bin:$PATH export PATH=$PWD/build/buildenv/bin:$PATH
%pyproject_install %{python_expand # install into every active flavored sitelib
python -mpip install \
--verbose --progress-bar off --disable-pip-version-check \
--root %{buildroot} \
--ignore-installed --no-deps \
--no-index --find-links ./dist pyparsing==%{version}
}
# fix venv install path # fix venv install path
mv %{buildroot}/$PWD/build/buildenv %{buildroot}%{_prefix} mv %{buildroot}/$PWD/build/buildenv %{buildroot}%{_prefix}
rm -r %{buildroot}/home rm -r %{buildroot}/home