On Mon, Dec 14, 2009 at 1:33 PM, Lukas Hetzenecker <[email protected]> wrote:
> Sorry, this version didn't run correctly on windows, i attached a new one.
> It would be great if you could quickly look at it and tell me if this could
> make any problems.

What I meant was to copy your files in the package directory when you
create your distribution,
*before* "python setup.py sdist" is called, so the classical install
mechanisms will work.
e.g.=

relase.sh:
    cp file pc/file
    python setup.py sdist
    rm pc/file

Meaning that in your development layout, they would stay out of "pc",
but get in there when you create the archive.

What you have done will not work as-is because setup.py can be called
for doing something else than 'sdist', so you need to run the code
only if 'sdist' is called.

But fixing this can make your setup.py code more fragile, thats why I
was thinking of a higher level
script.

Last, if you really dislike the idea of seeing these file shipped in
the distribution archive within a package, (pc), David's proposal is
the less hackish:

Create your own distutils command with your custom behavior for
copying files in the target system
at install time. overriding install_data.run would be the simplest way
in that case.

see: http://docs.python.org/distutils/extending.html#integrating-new-commands


Tarek
_______________________________________________
Distutils-SIG maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to