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:
101
101
102
102
- run : python -c 'import numpy; print(numpy)'
103
103
104
+ - run : python -c 'import os; print(os.environ)'
105
+
104
106
- run : bundle install
105
107
106
108
- run : rake compile
107
109
108
110
- run : python lib/pycall/python/investigator.py
109
111
110
112
- 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)"
112
115
env:
113
116
PYTHON: python
117
+ continue-on-error: true
114
118
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)
42
42
python , python_config = find_python_config ( python )
43
43
suffix = python_config [ :SHLIB_SUFFIX ]
44
44
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
+
45
53
candidate_paths ( python_config ) do |path |
46
54
debug_report ( "Candidate: #{ path } " )
47
55
normalized = normalize_path ( path , suffix )
Original file line number Diff line number Diff line change @@ -72,4 +72,14 @@ def _linked_libpython_windows():
72
72
get_config_var ("VERSION" )
73
73
print ("VERSION: {val}" .format (val = version ))
74
74
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