diff --git a/lib/qwandry/launcher.rb b/lib/qwandry/launcher.rb index b3ca0bf..569f1bd 100644 --- a/lib/qwandry/launcher.rb +++ b/lib/qwandry/launcher.rb @@ -101,6 +101,14 @@ module Qwandry add :perl, path, :class=>Qwandry::LibraryRepository end + # add python repositories: + python_paths = `python -c 'import sys;print \"\\n\".join(sys.path)'` rescue '' + python_paths.split("\n").reject{|path| path == '' || path == '.' || path =~ /\.zip$/ || path =~/lib-dynload$/}.each do |path| + add :python, path, :class=>Qwandry::LibraryRepository, :reject => /\.(py[oc])|(egg-info)$/ + end + + # Qwandry is a ruby app after all, so activate ruby and rubygems by default. Other defaults can be set + # with a custom init.rb activate :ruby, :gem end