You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to find a way to manually set the shebang executable of scripts installed from wheels.
Our company must deploy and use many versions of python -- even different "micro" releases (e.g. 2.7.9 vs 2.7.10) -- across multiple OSes with a very large set of packages installed from PyPI and from source. Adding a single new requirement can take a lot of time to redeploy for all of these targets. Baking sys.executable into the shebang ties a deployment to a particular micro release of python on a particular OS, even when packages could easily be reused across micro releases, and even across OS in the case of pure python packages.
To reduce the number of deployments, and thereby cut down on our build time, I'd like to be able to set the shebang of bin scripts to #!/usr/bin/env python, so that the active version of python will be found on any of our Linux and OSX flavors.
I believe this should be a matter of getting an option from pip install through to pip.wheel.move_wheel_files() in order to do the following:
Currently, we build wheels of all our requirements and cache them locally, so if the problem can be solved during the building of wheels, that would be acceptable as well, though ultimately less generally useful.
Thanks!
The text was updated successfully, but these errors were encountered:
The entry_points scripts are only written after the wheel is installed.
If you want to make a standalone tool it would be very easy to excerpt the part of pip.wheel that calls ScriptMaker, and use a normal non-vendored copy of distlib, to regenerate the scripts for any installed package, at any time after it has been installed.
Closing this, I don't believe this use case is sufficiently general to include into pip, in particular since you can add this yourself by regenerating the scripts as mentioned by Daniel.
I'm trying to find a way to manually set the shebang executable of scripts installed from wheels.
Our company must deploy and use many versions of python -- even different "micro" releases (e.g. 2.7.9 vs 2.7.10) -- across multiple OSes with a very large set of packages installed from PyPI and from source. Adding a single new requirement can take a lot of time to redeploy for all of these targets. Baking
sys.executable
into the shebang ties a deployment to a particular micro release of python on a particular OS, even when packages could easily be reused across micro releases, and even across OS in the case of pure python packages.To reduce the number of deployments, and thereby cut down on our build time, I'd like to be able to set the shebang of bin scripts to
#!/usr/bin/env python
, so that the active version of python will be found on any of our Linux and OSX flavors.I believe this should be a matter of getting an option from
pip install
through topip.wheel.move_wheel_files()
in order to do the following:Currently, we build wheels of all our requirements and cache them locally, so if the problem can be solved during the building of wheels, that would be acceptable as well, though ultimately less generally useful.
Thanks!
The text was updated successfully, but these errors were encountered: