[Distutils] Using Scripts\foo.exe on a python which doesn't have Distribute installed?

Matt Wilkie maphew at gmail.com
Sun May 26 07:28:48 CEST 2013


> The foo.exe launcher doesn't use the entry point, all it does is run
> an adjacent foo-script.py.  You can put anything you want in
> foo-script.py adjacent to that .exe, and it'll run.

Ahhh, perfect! I've verified it works for me, and much better than
bundling a duplicate of Distribute. Thanks!

[...later]: is a postinstall the best (only?) means to replace the
contents of foo-script.py? By experimentation I've learned the
`entry_points=` script supersedes a `scripts=` script of the same
name.


> As for different versions of pkg_resources on sys.path, Python always
> puts the directory containing the script first.  So if there's a
> pkg_resources.py adjacent to the script, that will take precedence
> over any other copy.

Thanks, this is good to know.

best,

-matt


More information about the Distutils-SIG mailing list