Make the unversioned %__python macro error
See https://fedoraproject.org/wiki/Changes/PythonMacroError While doing it, make %python macros more consistent with %python3 macros, mostly wrt whitespace but also to use python -m pip over plain pip etc. One significant change is the removal of sleeps from python macros, this could affect packages that use python macros to build for Python 2 while also using python3 macros to build for Python 3. In reality, I consider that unlikely. The sleep in python2 macros stays. The --strip-file-prefix option was already removed from %pyX_install_wheel but we forgot to remove it from %py_install_wheel.
This commit is contained in:
parent
59abe832d4
commit
69b1b30d53
6 changed files with 46 additions and 22 deletions
|
|
@ -30,17 +30,17 @@
|
|||
%py3_install() %{expand:\\\
|
||||
CFLAGS="${CFLAGS:-${RPM_OPT_FLAGS}}" LDFLAGS="${LDFLAGS:-${RPM_LD_FLAGS}}"\\\
|
||||
%{__python3} %{py_setup} %{?py_setup_args} install -O1 --skip-build --root %{buildroot} %{?*}
|
||||
rm -rfv %{buildroot}%{_bindir}/__pycache__
|
||||
rm -rfv %{buildroot}%{_bindir}/__pycache__
|
||||
}
|
||||
|
||||
%py3_install_egg() %{expand:\\\
|
||||
mkdir -p %{buildroot}%{python3_sitelib}
|
||||
easy_install-%{python3_version} -m --prefix %{buildroot}%{_prefix} -Z dist/*-py%{python3_version}.egg %{?*}
|
||||
%{__python3} -m easy_install -m --prefix %{buildroot}%{_prefix} -Z dist/*-py%{python3_version}.egg %{?*}
|
||||
rm -rfv %{buildroot}%{_bindir}/__pycache__
|
||||
}
|
||||
|
||||
%py3_install_wheel() %{expand:\\\
|
||||
pip%{python3_version} install -I dist/%{1} --root %{buildroot} --no-deps
|
||||
%{__python3} -m pip install -I dist/%{1} --root %{buildroot} --no-deps
|
||||
rm -rfv %{buildroot}%{_bindir}/__pycache__
|
||||
for distinfo in %{buildroot}%{python3_sitelib}/*.dist-info %{buildroot}%{python3_sitearch}/*.dist-info; do
|
||||
if [ -f ${distinfo}/direct_url.json ]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue