Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #5092

Merge multiple source directories into one package with distutils?

Path csiph.com!x330-a1.tempe.blueboxinc.net!aioe.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From Gregory Ewing <greg.ewing@canterbury.ac.nz>
Newsgroups comp.lang.python
Subject Merge multiple source directories into one package with distutils?
Date Wed, 11 May 2011 17:35:08 +1200
Lines 27
Message-ID <92ulgfFmukU1@mid.individual.net> (permalink)
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
X-Trace individual.net AF3PhODCoaQPwHtPqTFc1wcuQF3UqVaihB8BH6DVTFHGxXVKeB
Cancel-Lock sha1:bO+nsusJd5/BRjGRTkci877c8wc=
User-Agent Mozilla Thunderbird 1.0.5 (Macintosh/20050711)
X-Accept-Language en-us, en
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:5092

Show key headers only | View raw


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?

-- 
Greg

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Merge multiple source directories into one package with distutils? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2011-05-11 17:35 +1200

csiph-web