You can use tempfiles and (on OSX) use the private API of ctypes to dlclose to close the handle. Different call on Windows I think. Something like
import _ctypes
import shutil
import tempfile
@pytest.fixture
def libfact():
tmp = tempfile.NamedTemporaryFile(delete=True)
shutil.copy2("./fact.so", tmp.name)
lib = CDLL(tmp.name)
yield lib
_ctypes.dlclose(lib.handle)
EDIT: fixed error mentioned in reply.Did you mean to have the `tmp.name` as the library passed into `CDDL`? If not, what’s the purpose of the copy?
OpenJDK is reference one build from the source which is then taken by vendors and tweaked and built.