From 3e18a2ac6f76b9ab5d376d12f8a21428ec361aea Mon Sep 17 00:00:00 2001 From: TizenOpenSource Date: Mon, 11 Mar 2024 09:30:05 +0900 Subject: [PATCH] Fix .spec for pip and flit_core Signed-off-by: TizenOpenSource --- packaging/python3-wheel.spec | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/packaging/python3-wheel.spec b/packaging/python3-wheel.spec index d279a5c..ff53071 100644 --- a/packaging/python3-wheel.spec +++ b/packaging/python3-wheel.spec @@ -8,7 +8,8 @@ Source0: wheel-%{version}.tar.gz Source1001: %{name}.manifest BuildRequires: pkgconfig(python3) -BuildRequires: python3-setuptools +BuildRequires: python3-pip +BuildRequires: python3-flit_core BuildArch: noarch @@ -28,15 +29,20 @@ final locations) at any later time. %build cp %{SOURCE1001} . -%{_bindir}/python3 setup.py build +# bootstrap with built-in pip +%{_bindir}/python3 -m venv build/env +build/env/bin/python -m ensurepip +export PYTHONPATH=build/env/lib/python%{python3_version}/site-packages +%{_bindir}/python3 -mpip wheel --verbose --progress-bar off --disable-pip-version-check --use-pep517 --no-build-isolation --no-deps --no-cache-dir --wheel-dir ./build . %install -%{_bindir}/python3 setup.py install --prefix=%{_prefix} --root=%{buildroot} +export PYTHONPATH=build/env/lib/python%{python3_version}/site-packages +%{_bindir}/python3 -mpip install --verbose --progress-bar off --disable-pip-version-check --root %{buildroot} --no-compile --ignore-installed --no-deps --no-index --no-cache-dir --find-links ./build wheel==%{version} %files %license LICENSE.txt +%{_bindir}/wheel %{python3_sitelib}/wheel/*.py -%{python3_sitelib}/wheel/__pycache__/* %{python3_sitelib}/wheel/cli/* %{python3_sitelib}/wheel/vendored/* -%{python3_sitelib}/wheel-%{version}-py%{python3_version}.egg-info +%{python3_sitelib}/wheel-%{version}.dist-info -- 2.34.1