Dave Malcolm <dmalc...@redhat.com> added the comment:

__os_install_post is defined within /usr/lib/rpm/redhat/macros and contains 
this fragment:
    /usr/lib/rpm/brp-python-bytecompile %{__python} 
%{?_python_bytecompile_errors_terminate_build} \

Hence it will use %{__python} as the default when byte-compiling.

%__python has the default definition of /usr/bin/python, but this can be 
overridden, either in the spec file using:
  %global __python some_path_to_the_python_to_use
or in the command-line invocation of rpmbuild:
  rpmbuild --define="__python some_path_to_the_python_to_use"

You can use the --showrc option to rpmbuild to see all of the macro expansions 
it's using (lots of output).

So if it is indeed using the wrong python executable to do the bytecompiling, 
the above ought to fix it.  The simplest fix would probably be for bdist_rpm to 
add:
  --define="__python %s" % sys.executable
to the rpmbuild invocation, I think.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14443>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to