-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Add proper shebangs to all Python scripts #197
Conversation
The current situation is certainly suboptimal. There's been previous discussion of this in issue #167. This should work on the builtin pythons for linux, I'm unclear on the effects in a virtualenv, especially if pillow has been installed for the system python but not in the virutalenv. I'm also concerned about the effect on windows. @cgohlke: Can you comment on that? |
Well, I'm not really into virtualenv but I think it should work properly. At least I didn't hear of anything failing because of it, and I guess it's common enough shebang to have been well-tested. As for Windows, I don't know of any thing that would fail. Considering that Windows either doesn't use shebangs (native) or uses a virtual env like MinGW or Cygwin, it should all work fine. |
The thing that concerns me with virtual env is that /usr/bin/env python will be from within the virtual env, but the scripts will be from the system python (or system python3) installation. I'm pretty sure that running the scripts will fail in that case. Also, is /usr/bin/env python going to work at all if we've only been installed under python3? |
Firstly, I'd like to note that distutils changes shebangs when it installs scripts. Therefore, the scripts which I
However, if the script has no shebang, it will be installed with no shebang at all. That's the main reason I'd like them all to have valid shebang |
Oh, if distutils rewrites them, then I'm a lot happier with whatever we put in there. |
Looks like it works with virtualenv, If debian and fedora have issues with it, we can deal with it in the packaging. (at least for debian.) |
Add /usr/bin/env python shebangs to all scripts in /Scripts.
Do not use libtiff 4.3.0 on macOS 11 builds
Currently, some of the scripts don't have a shebang at all, some others have it pointing towards
/usr/local/bin/python
. With this patch, all shebangs use/usr/bin/env python
consistently.