Hi list,

I've been trying to get new Python 3.8 builds for the MapServer project - these 
are SWIG-generated bindings that require many DLLs to import in Python. Up 
until now this worked by adding a folder to the top of the Windows PATH. 

I've read through the discussions at https://bugs.python.org/issue36085 and 
understand the reasoning behind the change. 

Is the recommended solution in cases of Python wrappers to create a 
project-specific environment variable and allow users to set this, which in 
turn the library adds with add_dll_directory?

However, there is one feature of using the Windows PATH that I can't seem to 
replicate with add_dll_directory.
The MapServer DLL builds are linked to sqlite3 3.24.0, whereas Python 3.8.2 is 
linked to 2.6.0. Building with matching versions is not something I can easily 
change. 

When using Windows PATH the folder with the newer version could be added to the 
front of the list to take priority and import worked correctly. This does not 
seem to be possible with add_dll_directory - the Python sqlite3.dll in 
C:\Python38\DLLs always takes priority leading to:

ImportError: DLL load failed while importing _mapscript: The specified 
procedure could not be found.

I presume I can't remove the C:\Python38\DLLs path, is there another solution 
to this issue?

Thanks in advance for any help,

Seth

--
web:http://geographika.co.uk
twitter: @geographika
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/I6JAXBKV4Y7MVF42RJ4XQIPYQMAVXHOF/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to