Merge multiple source directories into one package with distutils?

Discussion in 'Python' started by Gregory Ewing, May 11, 2011.

  1. 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
    Gregory Ewing, May 11, 2011
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?TGFzc2UgTmlsc3Nvbg==?=

    Multiple bin-directories with virtual directories?

    =?Utf-8?B?TGFzc2UgTmlsc3Nvbg==?=, Nov 9, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    825
    =?Utf-8?B?TGFzc2UgTmlsc3Nvbg==?=
    Nov 9, 2004
  2. timw.google
    Replies:
    1
    Views:
    531
    Serge Orlov
    May 11, 2006
  3. Replies:
    0
    Views:
    265
  4. Pavel Panchekha

    Distutils evil voodoo: install into a package

    Pavel Panchekha, Aug 24, 2009, in forum: Python
    Replies:
    2
    Views:
    268
    Pavel Panchekha
    Aug 28, 2009
  5. Replies:
    17
    Views:
    93
    Rustom Mody
    May 22, 2014
Loading...

Share This Page