Skip to content

Conversation

@mbreese
Copy link

@mbreese mbreese commented Jul 21, 2012

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 args
Example:
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.

mbreese added 11 commits July 21, 2012 05:57
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
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
@mbreese
Copy link
Author

mbreese commented Jul 30, 2012

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant