[Distutils] Using Scripts\foo.exe on a python which doesn't have Distribute installed?
Matt Wilkie
maphew at gmail.com
Sat May 25 09:55:34 CEST 2013
slapped reply too early, sorry.
> Alternatively, you can bundle a copy of pkg_resources.py,
I managed to get this to work by adding it as a script in setup.py:
#smelly hack, allows foo.exe to run on machines w/out Distribute
scripts = [
'setup/pkg_resources.py',
],
this puts it in "PythonXX\Scripts" on the target machine, as I'm sure you know.
What happens if the target machine already has Distribute or
Setuptools installed, and thus has pkg_resources somewhere under
"PythonXX\Lib\site-packages", and likely a different version to boot?
I tried putting it in the same tree as our stuff,
"foo/external/pkg_resources.py", but that's not found. I'm assuming
because it thinks it's name is "foo.external.pkg_resources".
-matt
On Sat, May 25, 2013 at 12:46 AM, Matt Wilkie <maphew at gmail.com> wrote:
> Thanks PJ.
>
> I haven't used py2exe as I don't want to redistribute python also,
> just our program. I'll dig into your other suggestions and see where I
> end up.
>
> -matt
More information about the Distutils-SIG
mailing list