mirror of
https://github.com/rubyjs/libv8
synced 2023-03-27 23:21:48 -04:00
Fix creating Gem::Version for python version which has non-numeric characters i.e 2.7.1+
This commit is contained in:
parent
f4101c3626
commit
9f7559e8df
1 changed files with 6 additions and 3 deletions
9
Rakefile
9
Rakefile
|
@ -61,10 +61,13 @@ task :compile, [:version] do |t, options|
|
||||||
|
|
||||||
print "Checking for Python..."
|
print "Checking for Python..."
|
||||||
version = `python --version 2>&1`
|
version = `python --version 2>&1`
|
||||||
|
version_number = version.split.last.match("[0-9.]+")[0]
|
||||||
crash "Python not found!" if version.split.first != "Python"
|
crash "Python not found!" if version.split.first != "Python"
|
||||||
crash "Python 3.x is unsupported by V8!" if Gem::Version.new(version.split.last) >= Gem::Version.new(3)
|
crash "Python 3.x is unsupported by V8!" if
|
||||||
crash "Python 2.4+ is required by V8!" if Gem::Version.new(version.split.last) < Gem::Version.new("2.4")
|
Gem::Version.new(version_number) >=
|
||||||
puts version.split.last
|
Gem::Version.new(3)
|
||||||
|
crash "Python 2.4+ is required by V8!" if Gem::Version.new(version_number) < Gem::Version.new("2.4")
|
||||||
|
puts version_number
|
||||||
end
|
end
|
||||||
|
|
||||||
puts "Compiling V8 (#{options.version})..."
|
puts "Compiling V8 (#{options.version})..."
|
||||||
|
|
Loading…
Reference in a new issue