By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,235 Members | 1,022 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,235 IT Pros & Developers. It's quick & easy.

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

P: n/a
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

Ch**********@noaa.gov
Jul 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On Qui 13 Mai 2004 15:21, Christopher Barker wrote:
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,
--
Godoy. <go***@ieee.org>
Jul 18 '05 #2

P: n/a
Christopher Barker <Ch**********@noaa.gov> writes:
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
Jul 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.