Red Hat Bugzilla – Bug 128981
rpm needs better python macros
Last modified: 2007-11-30 17:07:03 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; Konqueror/3.2) (KHTML, like Gecko)
Description of problem:
rpm need better macros for supporting builds of Python packages. These should be made available on all plattforms and distributions.
Some examples what I often need:
python: path of current python interpreter (may be overwritten
by eg. --define 'python /usr/local/bin/python1.5.2'
python_version: version of current python interpreter
pycomp: Generate normal (.pyc) byte-compiled files.
pycompo Generate optimized (.pyo) byte-compiled files.
Since a python packager often wants to build her packages for different python versions, these things can not be hardcoded.
Enclosed please find a macro definition file which may be used.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Created attachment 102365 [details]
rpmmacros file implementing the requested macros
Created attachment 102367 [details]
sample .spec to demonstrate the macros
This is cut out of a real-world example (psycopg).
# rpmbuild -bp ./test2.spec
# rpmbuild -bp --define 'python /usr/local/bin/python1.5' ./test2.spec
zo see the effect.
Internal RFE bug #129900 entered; will be considered for future releases.
*** This bug has been marked as a duplicate of 120635 ***
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.