Message159396
__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. |
|
Date |
User |
Action |
Args |
2012-04-26 16:26:09 | dmalcolm | set | recipients:
+ dmalcolm, ncoghlan, pitrou, tarek, eric.araujo, rosslagerwall |
2012-04-26 16:26:09 | dmalcolm | set | messageid: <1335457569.36.0.416134845905.issue14443@psf.upfronthosting.co.za> |
2012-04-26 16:26:08 | dmalcolm | link | issue14443 messages |
2012-04-26 16:26:08 | dmalcolm | create | |
|