diff --git a/python-virtualenv.spec b/python-virtualenv.spec index 4d9e0eb..6f622f4 100644 --- a/python-virtualenv.spec +++ b/python-virtualenv.spec @@ -88,17 +88,24 @@ test ! -f src/virtualenv/seed/embed/wheels/*.whl sed -i -e 's/distlib<1,>=0.3.6/distlib<1,>=0.3.2/' \ -e 's/filelock<4,>=3.4.1/filelock<4,>=3.3.1/' \ -e 's/platformdirs<4,>=2.4/platformdirs<4,>=2.3/' \ + -e 's/hatchling>=1.12.2/hatchling>=0.25/' \ + -e 's/hatch-vcs>=0.3/hatch-vcs>=0.2.1/' \ pyproject.toml %generate_buildrequires -%pyproject_buildrequires +# EPEL 9: old hatchling needs the -w option +%pyproject_buildrequires -w %build -%pyproject_wheel +# EPEL 9: %%pyproject_buildrequires -w makes this redundant +# %%pyproject_wheel %install %pyproject_install %pyproject_save_files virtualenv +# EPEL 9: old version of setuptools_scm produces files incompatible with +# assumptions in virtualenv code, we append the expected attributes: +echo '__version__, __version_tuple__ = version, version_tuple' >> %{buildroot}%{python3_sitelib}/virtualenv/version.py %if %{with tests} %check @@ -106,7 +113,7 @@ sed -i -e 's/distlib<1,>=0.3.6/distlib<1,>=0.3.2/' \ # importlib.metadata entry points and # that leads to failed tests where # virtualenv is run via subprocess. -rm -rv *.dist-info +# rm -rv *.dist-info -- EPEL 9: this file is not here with %%pyproject_buildrequires -w # Skip tests which requires internet or some extra dependencies # Requires internet: @@ -135,6 +142,9 @@ PIP_CERT=/etc/pki/tls/certs/ca-bundle.crt \ %files -n python3-virtualenv -f %{pyproject_files} %doc README.md %{_bindir}/virtualenv +# EPEL 9: old hatchling does not mark this as License-File automatically +# (this will produce a "File listed twice" warning, ignore it) +%license %{python3_sitelib}/virtualenv-%{version}.dist-info/license_files/LICENSE %changelog * Thu Feb 09 2023 Lumír Balhar - 20.19.0-1