File tree Expand file tree Collapse file tree 3 files changed +31
-2
lines changed Expand file tree Collapse file tree 3 files changed +31
-2
lines changed Original file line number Diff line number Diff line change @@ -101,14 +101,25 @@ jobs:
101101
102102 - run : python -c 'import numpy; print(numpy)'
103103
104+ - run : python -c 'import os; print(os.environ)'
105+
104106 - run : bundle install
105107
106108 - run : rake compile
107109
108110 - run : python lib/pycall/python/investigator.py
109111
110112 - run : |
111- rake
113+ ruby -Ilib -Iext/pycall -rpycall -e "p PyCall.sys.version"
114+ ruby -Ilib -Iext/pycall -rpycall -e "PyCall.import_module(:numpy)"
112115 env:
113116 PYTHON: python
117+ continue-on-error: true
114118
119+ - run : |
120+ echo $env:PATH
121+ rake
122+ env:
123+ PYTHON: python
124+ CONDA_DLL_SEARCH_MODIFICATION_ENABLE: 1
125+ continue-on-error: true
Original file line number Diff line number Diff line change @@ -42,6 +42,14 @@ def find_libpython(python = nil)
4242 python , python_config = find_python_config ( python )
4343 suffix = python_config [ :SHLIB_SUFFIX ]
4444
45+ use_conda = ( ENV . fetch ( "CONDA_PREFIX" , nil ) == File . dirname ( python_config [ :executable ] ) )
46+ python_home = if !ENV . key? ( "PYTHONHOME" ) || use_conda
47+ python_config [ :PYTHONHOME ]
48+ else
49+ ENV [ "PYTHONHOME" ]
50+ end
51+ ENV [ "PYTHONHOME" ] = python_home
52+
4553 candidate_paths ( python_config ) do |path |
4654 debug_report ( "Candidate: #{ path } " )
4755 normalized = normalize_path ( path , suffix )
Original file line number Diff line number Diff line change @@ -72,4 +72,14 @@ def _linked_libpython_windows():
7272 get_config_var ("VERSION" )
7373print ("VERSION: {val}" .format (val = version ))
7474
75- print ("version_major: {val}" .format (val = sys .version_info .major ))
75+ if is_windows :
76+ if hasattr (sys , "base_exec_prefix" ):
77+ PYTHONHOME = sys .base_exec_prefix
78+ else :
79+ PYTHONHOME = sys .exec_prefix
80+ else :
81+ if hasattr (sys , "base_exec_prefix" ):
82+ PYTHONHOME = ":" .join ([sys .base_prefix , sys .base_exec_prefix ])
83+ else :
84+ PYTHONHOME = ":" .join ([sys .prefix , sys .exec_prefix ])
85+ print ("PYTHONHOME: {val}" .format (val = PYTHONHOME ))
You can’t perform that action at this time.
0 commit comments