openSUSE / python-rpm-macros

Multi-Python, Single-Spec macros generator
Other
22 stars 20 forks source link

%python_exec is broken with multiple python3 flavours #72

Closed mcepl closed 4 years ago

mcepl commented 4 years ago

So, for example, in python-attr SPEC file we have:

%check 
%python_exec dry_attr.py

which unfortunately expands to:

[   17s] Executing(%check): /bin/sh -e /var/tmp/rpm-tmp.jJGuqZ
[   17s] + umask 022
[   17s] + cd /home/abuild/rpmbuild/BUILD
[   17s] + cd attr-0.3.1
[   17s] ++ '[' -f _current_flavor ']'
[   17s] ++ cat _current_flavor
[   17s] + python_flavor=python38
[   17s] + '[' -z python38 ']'
[   17s] + '[' python38 '!=' python36 ']'
[   17s] + '[' -d build ']'
[   17s] + mv build _build.python38
[   17s] + '[' -d _build.python36 ']'
[   17s] + mv _build.python36 build
[   17s] + echo python36
[   17s] + %__/usr/bin/python3.6 dry_attr.py
bnavigator commented 4 years ago

70