Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Merge multiple source directories into one package with distutils?

Thread Tools

Merge multiple source directories into one package with distutils?

Gregory Ewing
Posts: n/a
Is there a straightforward way to tell distutils to merge files from more than one source directory into a single
package when installing?

PyGUI consists of some generic modules and some platform
specific ones, that conceptually all live at the same level
within a single package. In the source, there is a subdirectory
for each platform containing the platform-dependent files.
When run from the source, __path__ manipulation is done to
make the appropriate platform subdirectory appear to be part
of the main package.

However, when installing, I would like to just copy the
generic files plus the relevant platform ones directly into
the destination package directory, so that __path__ fiddling
is not needed. This is so that bundling tools such as py2app
and py2exe can find all the relevant modules without requiring
any hacking.

But distutils doesn't appear to support this. Unless I'm
missing something, you only get to specify one source directory
for each package.

Anyone have any ideas for getting around this?

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Merge two directories together Keith Hughitt Python 2 04-16-2010 06:16 PM
How to merge a module into a package w/ distutils? Python 0 09-06-2008 08:47 PM
Program to merge mp3 directories Tony NZ Computing 6 11-16-2007 09:06 AM
How do I put empty directories into a gem package? Luke Ruby 4 03-27-2007 08:15 PM
Multiple bin-directories with virtual directories? =?Utf-8?B?TGFzc2UgTmlsc3Nvbg==?= ASP .Net 0 11-09-2004 05:49 PM