99import glob
1010import os
1111import sys
12- from ctypes .util import find_library
1312from pathlib import Path
1413
1514import numpy
@@ -33,30 +32,6 @@ def get_nanobind_config():
3332nanobind_macros = [("NB_COMPACT_ASSERTIONS" , None )]
3433
3534
36- def get_boost_libraries ():
37- major , minor = sys .version_info [:2 ]
38- candidates = [
39- f"boost_python{ major } { minor } " ,
40- f"boost_python{ major } " ,
41- "boost_python" ,
42- ]
43-
44- conda_prefix = os .environ .get ("CONDA_PREFIX" )
45- if conda_prefix :
46- libdir = os .path .join (conda_prefix , "lib" )
47- for name in candidates :
48- so = f"lib{ name } .so"
49- if os .path .isfile (os .path .join (libdir , so )):
50- return [name ]
51-
52- # fallback to ldconfig
53- for name in candidates :
54- found = find_library (name )
55- if found :
56- return [name ]
57- raise RuntimeError ("Cannot find a suitable Boost.Python library." )
58-
59-
6035def get_boost_config ():
6136 boost_path = os .environ .get ("BOOST_PATH" , "" )
6237 if boost_path :
@@ -121,7 +96,7 @@ def get_objcryst_libraries():
12196objcryst_libs = get_objcryst_libraries ()
12297
12398ext_kws = {
124- "libraries" : ["diffpy" ] + get_boost_libraries () + objcryst_libs ,
99+ "libraries" : ["diffpy" ] + objcryst_libs ,
125100 "extra_compile_args" : compile_args ,
126101 "extra_link_args" : extra_link_args ,
127102 "include_dirs" : [numpy .get_include ()] + boost_cfg ["include_dirs" ],
0 commit comments