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 py_sitedir: %{_libdir}/python%{python_version}/site-packages 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): 4.2.2 How reproducible: Always Steps to Reproduce: 1. 2. 3. Additional info:
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). Call with # rpmbuild -bp ./test2.spec and # 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.