Get correct Python LIBDIR for Msys virtualenvs.
On Windows/Msys, when using Python virtual environment,
we first ask Python for the LIBDIR, which points to the main
install location rather than the virtual environment location.
This ensures cocotb can find the Python libraries to link to.
@@ -44,7 +44,10 @@ PYTHON_BIN?=$(PYTHON_DIR)/python.exe
# We might work with other Python versions
LOCAL_PYTHON_VERSION?=$(shell $(PYTHON_BIN) -c 'import distutils.sysconfig; print( distutils.sysconfig.get_python_version() )')
PYTHON_DYNLIBDIR:=$(shell $(PYTHON_BIN) -c 'from distutils import sysconfig; print( sysconfig.get_config_var("DESTSHARED") )')
+PYTHON_LIBDIR:=$(shell $(PYTHON_BIN) -c 'from distutils import sysconfig; print( sysconfig.get_config_var("LIBDIR") )')
+ifeq ($(PYTHON_LIBDIR),None)
PYTHON_LIBDIR=$(PYTHON_DIR)/libs
+endif
period := .
empty :=
