Skip to content

Commit

Permalink
[py] Remove unused virtual environment handling from crazy-fun
Browse files Browse the repository at this point in the history
  • Loading branch information
davehunt committed Nov 7, 2016
1 parent ac158e0 commit 1d05820
Showing 1 changed file with 0 additions and 28 deletions.
28 changes: 0 additions & 28 deletions rake-tasks/crazy_fun/mappings/python.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ def add_all(fun)
fun.add_mapping("py_test", Python::AddDependencies.new)
fun.add_mapping("py_test", Python::RunTests.new)

fun.add_mapping("py_env", Python::VirtualEnv.new)

fun.add_mapping("py_docs", Python::GenerateDocs.new)

fun.add_mapping("py_install", Python::Install.new)
Expand Down Expand Up @@ -82,32 +80,6 @@ def handle(fun, dir, args)
end
end

class VirtualEnv
def handle(fun, dir, args)
task Tasks.new.task_name(dir, args[:name]) do
dest = Platform.path_for(args[:dest])
pip_pkg = "pip install #{args[:packages].join(' ')}"
virtualenv = ["virtualenv", "--no-site-packages", " #{dest}"]
virtualenv += ["-p", ENV['pyversion']] if ENV['pyversion']
sh virtualenv.join(' '), :verbose => true do |ok, res|
unless ok
puts ""
puts "PYTHON DEPENDENCY ERROR: Virtualenv not found."
puts "Please run '[sudo] pip install virtualenv'"
puts ""
end
end

slash = Platform.dir_separator
python_dir = dest + slash + (windows? ? "Scripts" : "bin")
pip_install = python_dir + slash + pip_pkg
sh pip_install, :verbose => true

sh "#{python_dir}#{slash}python setup.py install", :verbose => true
end
end
end

class GenerateDocs < Tasks
def handle(fun, dir, args)
task Tasks.new.task_name(dir, args[:name]) do
Expand Down

0 comments on commit 1d05820

Please sign in to comment.