Merge multiple source directories into one package with distutils?

G

Gregory Ewing

Is there a straightforward way to tell distutils to merge
..py 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?
 

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

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top