New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect sys.argv[0] for generated console scripts on Windows #459

bb-migration opened this Issue Nov 7, 2015 · 0 comments


None yet
1 participant

bb-migration commented Nov 7, 2015

Originally reported by: pombredanne (Bitbucket: pombredanne, GitHub: pombredanne)

The code that generates entry point console script return an incorrect value for sys.argv[0] on windows:

Even if the script was called from the CLI as XXXX, sys.argv[0] will be
It should instead by XXXX.

pip handles this by fixing sys.argv[0] in the generated launcher script for wheels here

distlib fixes sys.argv[0] here in a similar way in the launcher script :

Setuptools does not and it should IMHO.

See also this issue: pypa/pip#3233

And where this was discovered: pallets/click#365

ofek added a commit to ofek/setuptools that referenced this issue Aug 16, 2016

Fix issue pypa#459
Patched sys.argv[0] before loading entry point

@ofek ofek referenced this issue Aug 16, 2016


Fix issue #459 #736

jaraco added a commit that referenced this issue Aug 20, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment