[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-distutils-sig
Subject:    Re: [Distutils] Creating rpm's for multiple python versions?
From:       Phil Schwartz <phil_schwartz () users ! sourceforge ! net>
Date:       2008-06-17 2:45:15
Message-ID: E1K8RC7-0001QC-Kz () pr-shellE ! sourceforge ! net
[Download RAW message or body]

From: phil_schwartz@users.sourceforge.net

Thanks for the reference Ignacio, however, I'm not sure how this applies to packaging the rpm in 
my current build environment.

[Quote]

If you are installing anything into the global site_packages directory, use the following trick.
First, define python_sitelib at the top of your specfile:

%{!?python_sitelib: %define python_sitelib %(%{__python} -c \
"from distutils.sysconfig import get_python_lib; print get_python_lib()")}

[End Quote]

since I don't have a spec file (distutils may create one as necessary and delete it).  

Running the following command returns the expected result:

$ python2.3 -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"
/usr/lib/python2.3/site-packages

But not sure how to include this in distutils (setup.py, setup.cfg, MANIFEST.in, etc).

Certainly, someone else be packaging their python apps for multiple python versions.  

Thanks for any addition leads,

Phil




Ignacio Vazquez-Abrams wrote:

You may want to consider reading Fedora's Python packaging
guidelines[1].

[1] http://fedoraproject.org/wiki/Packaging/Python


On Fri, 2008-06-13 at 14:36 -0700, Phil Schwartz wrote:
> > I have a Fedora Core 7 development server that has python2.3,
> > python2.4 and python2.5 installed.  I'd like to build rpm's of my
> > application for each
> > of these versions of python.

> > How can I force the rpm's to include the proper site-packages path
> > (for python2.3 that would be "/usr/lib/python2.3/site-packages/")?


-- Ignacio Vazquez-Abrams <ivazqueznet@gmail.com> 
_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
http://mail.python.org/mailman/listinfo/distutils-sig
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic