Skip to content
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

altering sys.argv[0] breaks scripts that try to re-run themselves on Windows #75

Closed
vsajip opened this issue Jun 10, 2015 · 3 comments
Closed
Labels
bug Something isn't working minor

Comments

@vsajip
Copy link
Collaborator

vsajip commented Jun 10, 2015

Original report by Chris Lambacher (Bitbucket: lambacck, GitHub: lambacck).


The script template breaks scripts that try to re-run themselves. Specifically the removal of the .exe extension causes the problem: https://bitbucket.org/pypa/distlib/src/3734434f608ecda54e97ba9fae4650686bd0336c/distlib/scripts.py?at=default#cl-55

This breaks at least PasteScript's paster serve --reload and Pyramid's pserve --monitor-restart.

While it is possible to fix this particular issue in both of these projects, that won't help anyone with older pinned versions if they upgrade to pip 7 which by default forces everything into a wheel first resulting in using this new method of handling scripts.

There was some discussion on #pypa and #pyramid about this on June 9, 2015 (#pypa log not linked because the logs are not currently working).

@vsajip
Copy link
Collaborator Author

vsajip commented Jun 10, 2015

pip is free to use a template other than the default template for scripts, but I don't have any major objection to leaving the .exe extension alone - it's really cosmetic. However, it may be that pip developers would want to replace the default script for other reasons (e.g. changing how exceptions are handled).

@vsajip
Copy link
Collaborator Author

vsajip commented Aug 4, 2016

Original changes by Vinay Sajip (Bitbucket: vinay.sajip, GitHub: vsajip).


changed priority from "major" to "minor"

@vsajip
Copy link
Collaborator Author

vsajip commented Dec 11, 2021

I'll close this now as it's pretty old, and there's nothing more to do on this IMO.

@vsajip vsajip closed this as completed Dec 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working minor
Projects
None yet
Development

No branches or pull requests

1 participant