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
|
|
@ -41,12 +41,12 @@
|
|||
|
||||
%py2_install_egg() %{expand:\\\
|
||||
mkdir -p %{buildroot}%{python2_sitelib}
|
||||
easy_install-%{python2_version} -m --prefix %{buildroot}%{_prefix} -Z dist/*-py%{python2_version}.egg %{?*}
|
||||
%{__python2} -m easy_install -m --prefix %{buildroot}%{_prefix} -Z dist/*-py%{python2_version}.egg %{?*}
|
||||
rm -rfv %{buildroot}%{_bindir}/__pycache__
|
||||
}
|
||||
|
||||
%py2_install_wheel() %{expand:\\\
|
||||
pip%{python2_version} install -I dist/%{1} --root %{buildroot} --no-deps
|
||||
%{__python2} -m pip install -I dist/%{1} --root %{buildroot} --no-deps
|
||||
rm -rfv %{buildroot}%{_bindir}/__pycache__
|
||||
for distinfo in %{buildroot}%{python2_sitelib}/*.dist-info %{buildroot}%{python2_sitearch}/*.dist-info; do
|
||||
if [ -f ${distinfo}/direct_url.json ]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue