Sha256: 380dc9b8da969b64f57e7bcf12ae75cc115ead73cd1f0f85fb9a428c34341ec2

Contents?: true

Size: 1.04 KB

Versions: 1

Compression:

Stored size: 1.04 KB

Contents

require 'mkmf'
require 'open3'

begin
  if (Open3.popen3("python --version") { |i,o,e| e.read}.chomp.split[1].to_f < 2.4)
    puts "Rubypython seem to think you don't have python 2.4 or higher."
    puts "Try install anyway? (y/n)"
    c=gets.chomp
    while !["y","n"].member? c do
      puts "Please type y or n"
    end
    if(c=="n")
      exit -1
    end
  end
rescue
  puts "Could not check python version. Do you have Python 2.4 or higher? (y/n)"
  if(gets.chomp == "n")
    puts "Please install Python 2.4 or higher"
    exit
  end
  puts "Okay."
end
dir_config("rubypython_bridge")
if(!system("which python-config"))
  print "Can't configure with python_config"
  exit -1
end

#unless find_library("python2.6",nil)||find_library("python2.5",nil)||find_library("python2.4",nil)
#  puts "Could not find python libraries"
#  exit -1
#end
$LDFLAGS << " " + `python-config --ldflags`
$CPPFLAGS << " " + `python-config --includes`.chomp

if RUBY_VERSION=~/1\.9/ then
	puts "Building for Ruby 1.9"
	$CPPFLAGS += " -DRUBY_19"
end


create_makefile("rubypython_bridge")

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rubypython-0.2.11 ext/rubypython_bridge/extconf.rb