Use new macros %python_wheel_dir and %python_wheel_pkg_prefix
..when creating the wheel subpackage. This does not actually change the name or the contents of the subpackage.
This commit is contained in:
parent
931a7e69a1
commit
b4e24c5cb6
@ -15,8 +15,7 @@
|
||||
%global srcname pip
|
||||
%global base_version 21.3.1
|
||||
%global upstream_version %{base_version}%{?prerel}
|
||||
%global python_wheelname %{srcname}-%{upstream_version}-py3-none-any.whl
|
||||
%global python_wheeldir %{_datadir}/python-wheels
|
||||
%global python_wheel_name %{srcname}-%{upstream_version}-py3-none-any.whl
|
||||
|
||||
%global bashcompdir %(pkg-config --variable=completionsdir bash-completion 2>/dev/null)
|
||||
|
||||
@ -232,7 +231,7 @@ A documentation for a tool for installing and managing Python packages
|
||||
|
||||
%endif
|
||||
|
||||
%package wheel
|
||||
%package -n %{python_wheel_pkg_prefix}-%{srcname}-wheel
|
||||
Summary: The pip wheel
|
||||
Requires: ca-certificates
|
||||
|
||||
@ -241,7 +240,7 @@ Requires: ca-certificates
|
||||
|
||||
%{crypt_compat_recommends 3}
|
||||
|
||||
%description wheel
|
||||
%description -n %{python_wheel_pkg_prefix}-%{srcname}-wheel
|
||||
A Python wheel of pip to use with venv.
|
||||
|
||||
%prep
|
||||
@ -258,7 +257,7 @@ sed -i '/html_theme = "furo"/d' docs/html/conf.py
|
||||
sed -i '/"sphinxcontrib.towncrier",/d' docs/html/conf.py
|
||||
|
||||
# tests expect wheels in here
|
||||
ln -s %{python_wheeldir} tests/data/common_wheels
|
||||
ln -s %{python_wheel_dir} tests/data/common_wheels
|
||||
|
||||
# Remove shebang from files in bundled chardet
|
||||
grep -lr "^#\!/usr/bin/env python" src/pip/_vendor/chardet/ | xargs sed -i "1d"
|
||||
@ -284,7 +283,7 @@ rm -rf docs/build/html/{.doctrees,.buildinfo}
|
||||
# /usr/bin/pip yet, so we install using the wheel directly.
|
||||
# (This is not standard wheel usage, but the pip wheel supports it -- see
|
||||
# pip/__main__.py)
|
||||
%{python3} dist/%{python_wheelname}/pip install \
|
||||
%{python3} dist/%{python_wheel_name}/pip install \
|
||||
--root %{buildroot} \
|
||||
--no-deps \
|
||||
--disable-pip-version-check \
|
||||
@ -335,8 +334,8 @@ ln -s ./pip-%{python3_version} %{buildroot}%{_bindir}/pip-3
|
||||
echo rpm > %{buildroot}%{python3_sitelib}/pip-%{upstream_version}.dist-info/INSTALLER
|
||||
rm %{buildroot}%{python3_sitelib}/pip-%{upstream_version}.dist-info/RECORD
|
||||
|
||||
mkdir -p %{buildroot}%{python_wheeldir}
|
||||
install -p dist/%{python_wheelname} -t %{buildroot}%{python_wheeldir}
|
||||
mkdir -p %{buildroot}%{python_wheel_dir}
|
||||
install -p dist/%{python_wheel_name} -t %{buildroot}%{python_wheel_dir}
|
||||
|
||||
|
||||
%if %{with tests}
|
||||
@ -396,11 +395,11 @@ pytest_k='not completion and
|
||||
%doc docs/build/html
|
||||
%endif
|
||||
|
||||
%files wheel
|
||||
%files -n %{python_wheel_pkg_prefix}-%{srcname}-wheel
|
||||
%license LICENSE.txt
|
||||
# we own the dir for simplicity
|
||||
%dir %{python_wheeldir}/
|
||||
%{python_wheeldir}/%{python_wheelname}
|
||||
%dir %{python_wheel_dir}/
|
||||
%{python_wheel_dir}/%{python_wheel_name}
|
||||
|
||||
%changelog
|
||||
* Mon Oct 25 2021 Miro Hrončok <mhroncok@redhat.com> - 21.3.1-1
|
||||
|
Loading…
Reference in New Issue
Block a user