File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed
bindings/pyroot/cppyy/cppyy/python/cppyy Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change @@ -340,9 +340,16 @@ def add_library_path(path):
340340 apipath_extra = os .path .join (os .path .dirname (apipath ), 'site' , 'python' + ldversion )
341341 if not os .path .exists (os .path .join (apipath_extra , 'CPyCppyy' )):
342342 import glob
343+ import platform
343344
344- import cppyy .libcppyy as libcppyy
345- ape = os .path .dirname (libcppyy .__file__ )
345+ if platform .system () == "Windows" :
346+ # On Windows, the library is found directly
347+ import libcppyy
348+ ape = os .path .dirname (libcppyy .__file__ )
349+ print ("libcppyy was found in" , ape )
350+ else :
351+ import cppyy .libcppyy as libcppyy
352+ ape = os .path .dirname (libcppyy .__file__ )
346353 # a "normal" structure finds the include directory up to 3 levels up,
347354 # ie. dropping lib/pythonx.y[md]/site-packages
348355 for i in range (3 ):
Original file line number Diff line number Diff line change 22"""
33
44import ctypes
5+ import platform
56import sys
67
78from . import _stdcpp_fix
2728except ImportError :
2829 c = None
2930
30- import cppyy .libcppyy as _backend
31+ if platform .system () == "Windows" :
32+ # On Windows, the library has to be searched without prefix
33+ import libcppyy as _backend
34+ print ("libcppyy was found in" , _backend .__file__ )
35+ else :
36+ import cppyy .libcppyy as _backend
3137
3238if c is not None :
3339 _backend ._cpp_backend = c
You can’t perform that action at this time.
0 commit comments