From 192e39e1a94bd745d72795269ef5ff7bd090a7b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= Date: Wed, 24 Nov 2021 15:25:20 +0100 Subject: [PATCH] Use new macros %python_wheel_dir and %python_wheel_pkg_prefix This does not actually change anything on Fedora. --- python-virtualenv.spec | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/python-virtualenv.spec b/python-virtualenv.spec index c47f165..0135bd9 100644 --- a/python-virtualenv.spec +++ b/python-virtualenv.spec @@ -45,9 +45,9 @@ BuildRequires: python3-pytest-timeout %endif # RPM installed wheels -BuildRequires: python-pip-wheel -BuildRequires: python-setuptools-wheel -BuildRequires: python-wheel-wheel +BuildRequires: %{python_wheel_pkg_prefix}-pip-wheel +BuildRequires: %{python_wheel_pkg_prefix}-setuptools-wheel +BuildRequires: %{python_wheel_pkg_prefix}-wheel-wheel %description virtualenv is a tool to create isolated Python environments. virtualenv @@ -74,9 +74,9 @@ Obsoletes: python3-virtualenv-python26 < 16.6 Provides: virtualenv = %{version}-%{release} # RPM installed wheels -Requires: python-pip-wheel -Requires: python-setuptools-wheel -Requires: python-wheel-wheel +Requires: %{python_wheel_pkg_prefix}-pip-wheel +Requires: %{python_wheel_pkg_prefix}-setuptools-wheel +Requires: %{python_wheel_pkg_prefix}-wheel-wheel %description -n python3-virtualenv virtualenv is a tool to create isolated Python environments. virtualenv @@ -112,6 +112,10 @@ rm src/virtualenv/seed/wheels/embed/wheel-* test ! -f src/virtualenv/seed/embed/wheels/*.whl +# Replace hardcoded path from rpm-wheels.patch by %%{python_wheel_dir} +# On Fedora, this should change nothing, but when building for RHEL9+, it will +sed -i "s|/usr/share/python-wheels|%{python_wheel_dir}|" src/virtualenv/util/path/_system_wheels.py + %build # Build code %{py3_build}