Can I use dist-utils to install a sub-package?

C

Christopher Barker

HI all,

I'd like to be able to use distutils to install a package within the
wxPython package:

wx.lib.MyPackage

I want to be able to do this so folks can upgrade a package of mine that
is in the wxPython library, without changing it's location.

In looking through the distutils docs, it looks like I cannot specify a
sub-package location for my package, It will only put it in
site-packages, not site-packages.wx.lib

Is there a way to do this?

thanks,
-Chris


--
Christopher Barker, Ph.D.
Oceanographer

NOAA/OR&R/HAZMAT (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception

(e-mail address removed)
 
T

Thomas Heller

Christopher Barker said:
HI all,

I'd like to be able to use distutils to install a package within the
wxPython package:

wx.lib.MyPackage

I want to be able to do this so folks can upgrade a package of mine
that is in the wxPython library, without changing it's location.

In looking through the distutils docs, it looks like I cannot specify
a sub-package location for my package, It will only put it in
site-packages, not site-packages.wx.lib

Is there a way to do this?

You should look into the pkgutil module, which is in Python 2.3. It is
supposed to support such schemes. Although I don't know if it requires
changes to wxPython itself.

Thomas
 
J

Jorge Godoy

HI all,

I'd like to be able to use distutils to install a package within the
wxPython package:

wx.lib.MyPackage

I want to be able to do this so folks can upgrade a package of mine that
is in the wxPython library, without changing it's location.

In looking through the distutils docs, it looks like I cannot specify a
sub-package location for my package, It will only put it in
site-packages, not site-packages.wx.lib

Is there a way to do this?

Chris,


Look at my previous post about distutils and RPM.

I'm doing something like that, only that I'm copying files because they are
not python scripts but images. And the other difference is that they are on
my own package...

You can try using the following construction:

setup(
name="name",
version="0.1",
(...)
packages=['wx.lib.YourPackage'],
package_dir = {'wx.lib.YourPackage': '.'},
(...)


Here you tell that your package has the 'wx.lib.YourPackage' name and is
located in the same directory as the setup script. You can put it somewhere
else.


I hope this helps.


Be seeing you,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top