@@ -267,7 +267,12 @@ def determine_if_statically_linked():
267
267
'pyprogramname' , 'libpython' ])
268
268
269
269
270
- def juliainfo (runtime = 'julia' ):
270
+ def juliainfo (runtime = 'julia' , ** popen_kwargs ):
271
+ # Use the original environment variables to avoid a cryptic
272
+ # error "fake-julia/../lib/julia/sys.so: cannot open shared
273
+ # object file: No such file or directory":
274
+ popen_kwargs .setdefault ("env" , _enviorn )
275
+
271
276
output = subprocess .check_output (
272
277
[runtime , "-e" ,
273
278
"""
@@ -282,18 +287,19 @@ def juliainfo(runtime='julia'):
282
287
PyCall_depsfile = Pkg.dir("PyCall","deps","deps.jl")
283
288
else
284
289
modpath = Base.locate_package(Base.identify_package("PyCall"))
285
- PyCall_depsfile = joinpath(dirname(modpath),"..","deps","deps.jl")
290
+ if modpath == nothing
291
+ PyCall_depsfile = nothing
292
+ else
293
+ PyCall_depsfile = joinpath(dirname(modpath),"..","deps","deps.jl")
294
+ end
286
295
end
287
296
if PyCall_depsfile !== nothing && isfile(PyCall_depsfile)
288
297
include(PyCall_depsfile)
289
298
println(pyprogramname)
290
299
println(libpython)
291
300
end
292
301
""" ],
293
- # Use the original environment variables to avoid a cryptic
294
- # error "fake-julia/../lib/julia/sys.so: cannot open shared
295
- # object file: No such file or directory":
296
- env = _enviorn )
302
+ ** popen_kwargs )
297
303
args = output .decode ("utf-8" ).rstrip ().split ("\n " )
298
304
args .extend ([None ] * (len (JuliaInfo ._fields ) - len (args )))
299
305
return JuliaInfo (* args )
0 commit comments