Bug 128981 - rpm needs better python macros
rpm needs better python macros
Status: CLOSED DUPLICATE of bug 120635
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: rpm (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Johnson
Mike McLean
: FutureFeature
Depends On:
  Show dependency treegraph
Reported: 2004-08-02 13:52 EDT by .
Modified: 2007-11-30 17:07 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-02-21 14:04:52 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
rpmmacros file implementing the requested macros (1.38 KB, text/plain)
2004-08-02 13:53 EDT, .
no flags Details
sample .spec to demonstrate the macros (810 bytes, text/plain)
2004-08-02 14:06 EDT, .
no flags Details

  None (edit)
Description . 2004-08-02 13:52:23 EDT
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):

How reproducible:

Steps to Reproduce:

Additional info:
Comment 1 . 2004-08-02 13:53:36 EDT
Created attachment 102365 [details]
rpmmacros file implementing the requested macros
Comment 2 . 2004-08-02 14:06:54 EDT
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
# rpmbuild -bp --define 'python /usr/local/bin/python1.5' ./test2.spec
zo see the effect.
Comment 3 Suzanne Hillman 2004-08-13 17:10:08 EDT
Internal RFE bug #129900 entered; will be considered for future releases.
Comment 5 Jeff Johnson 2005-02-07 18:46:47 EST

*** This bug has been marked as a duplicate of 120635 ***
Comment 6 Red Hat Bugzilla 2006-02-21 14:04:52 EST
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.

Note You need to log in before you can comment on or make changes to this bug.