Source1001: %{name}.manifest
BuildRequires: pkgconfig(python3)
-BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+BuildRequires: python3-flit_core
BuildArch: noarch
%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