lib/pycall/init.rb in pycall-1.3.1 vs lib/pycall/init.rb in pycall-1.4.0
- old
+ new
@@ -28,23 +28,18 @@
end
class << PyCall::LibPython
remove_method :const_missing
end
- ENV['PYTHONPATH'] = [ File.expand_path('../python', __FILE__), ENV['PYTHONPATH'] ].compact.join(File::PATH_SEPARATOR)
-
LibPython.instance_variable_set(:@handle, LibPython::Finder.find_libpython(python))
class << LibPython
undef_method :handle
attr_reader :handle
end
- begin
- major, minor, _ = RUBY_VERSION.split('.')
- require "#{major}.#{minor}/pycall.so"
- rescue LoadError
- require 'pycall.so'
- end
+ require 'pycall.so'
+
+ PyCall.sys.path.append(File.expand_path('../python', __FILE__))
require 'pycall/dict'
require 'pycall/list'
require 'pycall/slice'
const_set(:PYTHON_VERSION, LibPython::PYTHON_VERSION)