Bug 128981 - rpm needs better python macros
Summary: rpm needs better python macros
Status: CLOSED DUPLICATE of bug 120635
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: rpm   
(Show other bugs)
Version: 3.0
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: Mike McLean
Keywords: FutureFeature
Depends On:
TreeView+ depends on / blocked
Reported: 2004-08-02 17:52 UTC by .
Modified: 2007-11-30 22:07 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-02-21 19:04:52 UTC
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 17:53 UTC, .
no flags Details
sample .spec to demonstrate the macros (810 bytes, text/plain)
2004-08-02 18:06 UTC, .
no flags Details

Description . 2004-08-02 17:52:23 UTC
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 17:53:36 UTC
Created attachment 102365 [details]
rpmmacros file implementing the requested macros

Comment 2 . 2004-08-02 18:06:54 UTC
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 21:10:08 UTC
Internal RFE bug #129900 entered; will be considered for future releases.

Comment 5 Jeff Johnson 2005-02-07 23:46:47 UTC

*** This bug has been marked as a duplicate of 120635 ***

Comment 6 Red Hat Bugzilla 2006-02-21 19:04:52 UTC
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.