how to find site-packages path (Michael Hoffman) - use distutils
vincent at visualtrans.de
Tue Jan 18 14:06:52 EST 2005
Philippe C. Martin wrote:
>>>Why would you want to copy any *.pyc instead of compiling them on
> I know that sounds terrible to the open source community,
but I do not
> intend to release the source code for my product
That's not why I asked. I'll leave the politics up to you. The thing is,
that the path info gets cached in the *.pyc file. This may lead to
confusing tracebacks - might they occur - when the user does not install
to the exact same drive/path as you did.
Additionally: if you *do* want to distribute *.pyc only, I personally
wouldn't find it terribly neat if you stuck those into the site-packages
directory of my Python installation. I - for one - would want to know
what kind of source code you place along *my* sys.path.
Maybe you should consider using py2exe to distribute - keeping your
*.pyc out of the user's Python directory tree, if any, entirely. Also,
you may want to consider using Inno Setup as deployment tool (if Windows
is your target platform). Using distutils for a *.py-less installer
seems pretty pointless.
- pls go to
> philippecmartin.com/applications.html for my _small_ contributions :-))
More information about the Python-list