nima / site

Modular shell-scripting framework - 99% native bash, 1% phat!
http://nima.github.io/site/
5 stars 4 forks source link

External scripting language module management #25

Closed nima closed 10 years ago

nima commented 10 years ago

Of course the aim here is not to re-invent the wheel, or to simply wrap virtualenv, rvm, or local-lib.

The aim is this: at times, your site bash modules will inevitably make use of (or simply wrap) another script written in Python, Ruby, or Perl. For example the current remote or softlayer modules does this.

The problem with the current setup is then, that the initial site installer has to install all the Python/Perl/Ruby modules at install time, even if the user might never actually want to use any site module which in turn uses those modules.

Having this feature means that site will be able to take care of on-demand installations of these modules, so that the installer will not need to install anything that isn't required for basic functionality. Here is an example of what would change; currently the following code simply deactivate the module softlayer if the Python pytz module is not available:

core:requires PYTHON pytz

With this feature however, it can optionally install it; being Python, it will know to use virtualenv, and being handled by site, it will install it into site's personal virtualenv sandbox.

nima commented 10 years ago

The framework for this work is complete, however it will need follow-up work. Where it needs follow-up work is made obvious from the use of the recently added return code CODE_NOTIMPL.

Commit 413210e closes this issue.