2023-02-13 15:16:58 +00:00
|
|
|
Name: python-virtualenv
|
|
|
|
Version: 20.19.0
|
|
|
|
Release: 0%{?dist}
|
|
|
|
Summary: Tool to create isolated Python environments
|
|
|
|
|
|
|
|
License: MIT
|
|
|
|
URL: http://pypi.python.org/pypi/virtualenv
|
|
|
|
Source: %{pypi_source virtualenv}
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
BuildRequires: python3-devel
|
|
|
|
BuildRequires: python3-pytest
|
|
|
|
|
|
|
|
%description
|
|
|
|
This specfile was added as a regression test to
|
|
|
|
https://src.fedoraproject.org/rpms/pyproject-rpm-macros/pull-request/363
|
|
|
|
|
|
|
|
It uses hatchling without %%pyproject_buildrequires -w.
|
|
|
|
|
|
|
|
|
|
|
|
%package -n python3-virtualenv
|
|
|
|
Summary: %{summary}
|
|
|
|
|
|
|
|
%description -n python3-virtualenv
|
|
|
|
...
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
%autosetup -p1 -n virtualenv-%{version}
|
2023-05-30 10:14:23 +00:00
|
|
|
# Relax the upper bounds of some dependencies to their known available versions in EL 9
|
|
|
|
sed -i -e 's/distlib<1,>=0.3.6/distlib<1,>=0.3.2/' \
|
2023-02-13 15:16:58 +00:00
|
|
|
-e 's/filelock<4,>=3.4.1/filelock<4,>=3.3.1/' \
|
2024-07-22 15:27:34 +00:00
|
|
|
-e 's/platformdirs<4,>=2.4/platformdirs<5,>=2.3/' \
|
2023-05-30 10:14:23 +00:00
|
|
|
-e 's/hatchling>=1.12.2/hatchling>=0.25/' \
|
|
|
|
-e 's/hatch-vcs>=0.3/hatch-vcs>=0.2.1/' \
|
2023-02-13 15:16:58 +00:00
|
|
|
pyproject.toml
|
2024-09-05 15:49:40 +00:00
|
|
|
# Drop the option for flaky
|
|
|
|
sed -i 's/--no-success-flaky-report//' pyproject.toml
|
2023-08-30 20:00:18 +00:00
|
|
|
# Hacky backport of https://src.fedoraproject.org/rpms/python-virtualenv/c/87b1f95664
|
|
|
|
%if 0%{?fedora} >= 39 || 0%{?rhel} >= 10
|
|
|
|
sed -i 's/_nonwrappers/_hookimpls/' tests/conftest.py
|
|
|
|
%endif
|
2023-02-13 15:16:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
%generate_buildrequires
|
2023-05-30 10:14:23 +00:00
|
|
|
%pyproject_buildrequires -w
|
2023-02-13 15:16:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
%build
|
2023-05-30 10:14:23 +00:00
|
|
|
# %%pyproject_buildrequires -w makes this redundant
|
|
|
|
# %%pyproject_wheel
|
2023-02-13 15:16:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
%pyproject_install
|
2023-09-27 12:37:15 +00:00
|
|
|
%pyproject_save_files -l virtualenv
|
2023-05-30 10:14:23 +00:00
|
|
|
%{?el9:
|
2023-02-13 15:16:58 +00:00
|
|
|
# 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
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
# test_main fails when .dist-info is not deleted at the end of %%pyproject_buildrequires
|
2024-09-05 15:49:40 +00:00
|
|
|
# tests/integration/test_zipapp.py imports flaky
|
2023-02-13 15:16:58 +00:00
|
|
|
PIP_CERT=/etc/pki/tls/certs/ca-bundle.crt \
|
2024-09-05 15:49:40 +00:00
|
|
|
%pytest -v -k test_main --ignore tests/integration/test_zipapp.py
|
2023-02-13 15:16:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
%files -n python3-virtualenv -f %{pyproject_files}
|
|
|
|
%doc README.md
|
|
|
|
%{_bindir}/virtualenv
|