Using distutils to install somethign into wx.lib
Christopher Barker
Chris.Barker at noaa.gov
Wed Aug 16 17:48:11 PDT 2006
Hi all,
I'm trying to figure out how to write a setup.py to install a new
version of wx.lib.floatcanvas
I tried this in the past, and couldn't figure it out, and just wrote my
own small install script. However, since then, I figured out how to
install a sub-package with distutils, so I thought I'd give it go. the
trick is this:
site-packages is the default root of all packages. However, if you set:
package_dir = {"wx.lib": ""}
then it matches the "wx.lib" to "" in your structure, so that you can
put your stuff in wx.lib.
However, wx.lib is not in site-packages/wx/lib. It's in something like:
site-packages/wx-2.6-gtk2-unicode/wx/lib
That's fine, I simply queries what file wx had when you did an "import
wx", to find the default dir. You could also run wxversion first if you
wanted to.
However, then we have a problem. Now your package looks like:
wx-2.6-gtk2-unicode.wx.lib.floatcanvas
which would be fine, except when you pass this into distutils, it
creates a directory structure like this:
creating build/lib/wx-2/6-gtk2-unicode/wx/lib/floatcanvas
It's replaced the "." in "2.6" with a "/", as that's what a dot means in
a package hierarchy. AARRGG!
anyone have any ideas?
I'm so close!
-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
Chris.Barker at noaa.gov
More information about the wxpython-users
mailing list