Turns out setup.py
is smarter than I thought - it automagically converts the hash-bang line to point to the python that it was installed with.
All you have to do is:
- put
#!/usr/bin/env python
at the beginning of your script - make your script executable -
$ chmod +x path/to/script
- put the script in the setup function
setup( #stuff goes here
scripts=['path/to/script'],
)
(myenv) $ python setup.py develop
(or install)
And magic happens!