KxSystems / pyq

PyQ — Python for kdb+
http://code.kx.com/q/interfaces
Apache License 2.0
190 stars 49 forks source link

get_python_dll() sometimes doesn't fail when when python_dll does not exist #79

Closed subthedubdub closed 5 years ago

subthedubdub commented 6 years ago

In setup.py, the function get_python_dll() contains the following lines at the end:

   ldlibrary = sysconfig.get_config_var('LDLIBRARY')
    libdir = sysconfig.get_config_var('LIBDIR')
    if ldlibrary and libdir:
        return os.path.join(libdir, ldlibrary)
    raise RuntimeError('no python dll')

Weirdly, it is possible that os.path.join(libdir, ldlibrary) does not exist in certain setups (as I observed at work, where the value returned was /var/tmp/*).

I recommended running os.path.exists prior to returning.

sashkab commented 5 years ago

This issue will be addressed by PyQ 4.2.0, fixed internally.

Internal issue 1024.