LLNL / conduit

Simplified Data Exchange for HPC Simulations
https://software.llnl.gov/conduit/
Other
207 stars 63 forks source link

remove use of distutils in python cmake introspection logic #1259

Closed cyrush closed 4 months ago

cyrush commented 4 months ago

needed to support python 3.12

cyrush commented 4 months ago

Trying to replace:

import sys;from distutils.sysconfig import get_python_lib;sys.stdout.write(get_python_lib())

The following do not work on ubunutu:

import sys;from sysconfig import get_path;sys.stdout.write(get_path('platlib'))
import sys;from sysconfig import get_path;sys.stdout.write(get_path('purelib'))

get_python_lib() points to a dist-packages dir (specific choice to debian + ubunutu) however: get_path('platlib') and get_path('purelib') return a path to a non-existent site-packages dir

More info:

https://stackoverflow.com/questions/122327/how-do-i-find-the-location-of-my-python-site-packages-directory