Basic support for python

This commit is contained in:
Adam Sanderson 2010-12-11 23:26:05 -08:00
parent d9c1c94296
commit 9cefce255d
1 changed files with 8 additions and 0 deletions

View File

@ -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