added support for virtualenv based installs#22
Open
mbreese wants to merge 11 commits intoyarden:fastmisofrom
Open
added support for virtualenv based installs#22mbreese wants to merge 11 commits intoyarden:fastmisofrom
mbreese wants to merge 11 commits intoyarden:fastmisofrom
Conversation
Altered Makefile to call install.sh for default action Added install.sh to setup virtualenv, run python install, install deps added "miso" driver script to setup virtualenv and call the required miso.py script
…run_miso" (both will work)
Added support for running MISO with and without virtualenv - the "miso" wrapper script adds an ENV variable if it is running... this way MISO can determine whether or not it should call 'python' or 'miso' when calling os.system(). To do this I added a get_miso_exec() method to settings.Settings. Added support for calling test scripts with miso driver script: miso $MISOHOME/misopy/test_miso.py
Author
|
Okay, I think this should cover the optional use of virtualenv. I also added support for using a non-default python interpreter (ex: python2.7). All hard-coded os.system calls were converted to 'Settings.get_miso_exec()'. This method checks for an environmental variable (MISO_SHELL_EXEC). This is set by the "miso" wrapper script. If it is set, then when os.system is called, it calls the "miso" wrapper script, otherwise it calls whatever sys.executable is. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Altered Makefile to call install.sh for default action
Added install.sh to setup virtualenv, run python install, install deps
added "miso" driver script to setup virtualenv and call the required miso.py script
This is a setup that I've used successfully in the past. If you setup a virtualenv based python install, then it makes installing the required dependencies much easier, especially for users that can't install system packages.
The idea is that you setup the virtualenv folder, then have one or more "driver" scripts that load the virtualenv environment, and then call a sub-script.
In this case, I've named the driver script
miso. It loads the virtualenv environment, and then calls the installed o MISO scripts. The MISO scripts are installed in env/bin.Usage:
miso cmd argsExample:
miso run_miso --compare-samples control/ knockdown/ comparisons/To make it easier to install, I added an install.sh script that automates setting up the virtualenv folder, and builds MISO. It then installs the required dependencies. I added this as the default method in the Makefile.