Skip to content

Commit d93fe8a

Browse files
committed
Not set paths when LIBPYTHON is specified
1 parent 2752e2e commit d93fe8a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/pycall/libpython/finder.rb

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ def find_libpython(python = nil)
4040
debug_report("find_libpython(#{python.inspect})")
4141
python, python_config = find_python_config(python)
4242

43-
set_PYTHONHOME(python_config)
44-
libs = make_libs(python_config)
45-
libpaths = make_libpaths(python_config)
46-
4743
# Try LIBPYTHON environment variable first.
4844
if (libpython = ENV['LIBPYTHON'])
4945
if File.file?(libpython)
@@ -59,6 +55,9 @@ def find_libpython(python = nil)
5955
end
6056

6157
# Find libpython (we hope):
58+
set_PYTHONHOME(python_config)
59+
libs = make_libs(python_config)
60+
libpaths = make_libpaths(python_config)
6261
multiarch = python_config[:MULTIARCH] || python_config[:multiarch]
6362
libs.each do |lib|
6463
libpaths.each do |libpath|

0 commit comments

Comments
 (0)