-
Notifications
You must be signed in to change notification settings - Fork 75
Add python shebang to the top #59
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
base: fastmiso
Are you sure you want to change the base?
Conversation
Hey Yarden since this gets installed as a script I put the business up top to let it get executed as one.
|
Hi Rory, Are you sure you installed the package rather than running the source code? When you install packages the Python package manager is supposed to use the path of the Python version you installed, and prepend it to each of the scripts (that typically go in a |
|
Hi Yarden, I think adding the /usr/bin/env -E to the top does inject the python-that-installed MISO there. Without it, the path doesn't seem to be added. On a fresh vagrant box I cloned the repo and installed with python setup.py install: Using the /usr/bin/env -E python patch: Maybe distribute or whatever doesn't add the path to python to files that don't end in .py? I stuck the -E on the end-- that ignores environment variables, so if the user has some wonky PYTHONPATH set or PYTHONHOME set that is pointing to the wrong MISO installation or what not, this will make it so python only uses the site-libraries from the specific python the top points to. If that behavior isn't what you are looking for removing it works as well. |
|
Congraulations on your defense. :) |
|
Just a note, the index_gff file doesn't get overwritten if you already installed MISO, so you have to manually remove it and install it if you want to see the that the /usr/bin/env is adding the path at the top. Python distribution FTL. |
|
That's all automatically generated by the package installer. On some Unix systems, |
|
Hi Yarden, Thanks for responding, sorry to be a pain in the neck. The repository on pip is a version behind and I think the 0.5.0 version uses the index_gff file with the index_gff.py file being deprecated: https://github.com/yarden/MISO/blob/fastmiso/misopy/index_gff.py Using setup.py and pip, without the patch on the 0.4.9 version does set the flag on index_gff.py correctly but using either setup.py or pip with the 0.5.0 version doesn't set it on the index_gff (not index_gff.py as that is deprecated) file. I blew away the old version and reinstalled this one via pip: |
|
Hi Rory, Thanks for this info. So 5.0 is not released yet - I'll see if I can reproduce this issue with |
|
Hi Yarden, Confirmed, index_gff.py got the shebang, just index_gff was not getting it set properly. |
|
Hi Rory, You can try out a 'pre-release' of miso 0.5.0 from the 'dev' branch of GitHub. The manual for it is here: https://miso.readthedocs.org/en/dev It has several improvements but more to the point here it should now fully take care of the executable v. non-executable issue you had. If you do end up trying it, would love to hear your feedback. Thanks very much. Best, Yarden |
|
If you try it, try it with latest release, we've had some minor issues in misopy-0.5.0 release. |
Hey Yarden,
Since this gets installed as a script I put the business up top to let it get executed.