File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -45,6 +45,12 @@ def python_executable
45
45
end
46
46
47
47
def install
48
+ # Create a directory for the Python module
49
+ py_module_dir = prefix /"lib/python"
50
+ mkdir_p py_module_dir
51
+ ENV [ "PIP_TARGET" ] = py_module_dir . to_s
52
+ ENV . delete ( "PYTHONPATH" ) # Clear PYTHONPATH to avoid conflicts
53
+
48
54
# Build path
49
55
build_dir = buildpath /"build"
50
56
Dir . mkdir ( build_dir )
@@ -63,8 +69,7 @@ def install
63
69
py3pip = py3prefix /"lib/python#{ py3ver } /site-packages"
64
70
65
71
# Add pip site packages folder to target so the build system can find it
66
- ENV . prepend_path "PIP_TARGET" , py3pip
67
-
72
+
68
73
# Set NodeJS
69
74
resource ( "node" ) . stage do
70
75
build_dir . install resource ( "node" )
@@ -151,6 +156,7 @@ def install
151
156
"else\n " ,
152
157
" PREFIX=\" ${PARENT}/Cellar/metacall/#{ version } \" \n " ,
153
158
"fi\n " ,
159
+ "export PYTHONPATH=\" ${PREFIX}/lib/python:${PYTHONPATH:-}\" \n " ,
154
160
"export NODE_PATH=#{ HOMEBREW_PREFIX } /lib/node_modules\n " ,
155
161
"export LOADER_LIBRARY=\" ${PREFIX}/lib\" \n " ,
156
162
"export SERIAL_LIBRARY_PATH=\" ${PREFIX}/lib\" \n " ,
You can’t perform that action at this time.
0 commit comments