Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uses wrong python binary for bytecompile? #11

Open
jflemer-ndp opened this issue Feb 2, 2017 · 0 comments
Open

Uses wrong python binary for bytecompile? #11

jflemer-ndp opened this issue Feb 2, 2017 · 0 comments

Comments

@jflemer-ndp
Copy link
Contributor

I'm not 100% sure this is a bug or not. I ran into it because I did not have the specific xxx-build RPM installed (rh-python35-build) to override some of the generic SCL macros, but look at this line:
https://github.com/sclorg/scl-utils/blob/master/rpm/brp-scl-python-bytecompile#L42
It ended up trying to use /usr/bin/python3.5 which does not exist.

I think it might make more sense to use:

python_binary=$scl_path/usr/bin/$(basename $python_libdir)

Or:

if [ -e $scl_path/usr/bin/$(basename $python_libdir) ]; then
  python_binary=$scl_path/usr/bin/$(basename $python_libdir)
else
  python_binary=/usr/bin/$(basename $python_libdir)
fi

(Or the entire loop could be refactored to be

for path_prefix in "" $scl_path; do
  python_bin=$path_prefix/usr/bin/$(basename $python_libdir)
  for python_libdir in $RPM_BUILD_ROOT/$path_prefix/usr/lib{,64}/python[0-9].[0-9]/; do
    ...
  done
done

)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant