-
-
Notifications
You must be signed in to change notification settings - Fork 375
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Python MapScript 3.8 support #6101
Comments
+1 on leveraging a MAPSERVER_HOME environment variable (and add_dll_directory), this will be very useful for Windows environments. |
Should it be called MAPSERVER_HOME, or instead MAPSERVER_PATH or MAPSERVER_DLL_PATH, or even MAPSCRIPT_PATH if it's specific to MapScript? The name MAPSERVER_HOME implies that it would apply to more than just DLLs and could potientally be the root of a complete MapServer tree where mapfiles and other support files would also be located in sub-directories, which could potentially be a future enhancement (TBD??) but is not the case here if I understood correctly. If we want to start using MAPSERVER_HOME, then I'd suggest that the DLLs be placed in a sub-directory called MAPSERVER_HOME/lib and it's this MAPSERVER_HOME/lib directory that would be added to the dll path. My 0.02$ |
Good points @dmorissette. Maybe MAPSCRIPT_PATH is better. |
@dmorissette @dmorissette thanks for the comments. My preference would be for
Possible alternative would be Looking at https://github.com/Toblerity/Fiona/pull/945/files Fiona might be checking all folders on the Windows PATH for a "gdal*.dll" file and adding that folder automatically. It could be an option to search for "mapserver*.dll" with the same approach - I'll look more at this approach as it wouldn't require the user to make any changes. |
MAPSERVER_DLL_PATH works for me. |
There are currently 2 blockers to adding Python 3.8 support (on Windows):
The SDK from GISInternals uses sqlite-3.24.0
https://www.gisinternals.com/packageinfo.php?file=release-1911-x64-gdal-mapserver.zip
This causes the following error when attempting to import mapscript:
To fix this I propose adding a new
MAPSERVER_HOME
variable to the Python MapScript library and adding this folder to the allowed DLLs folders usingos.add_dll_directory
on startup. All MapServer DLLs should be copied to this location prior to running tests.On the command line the variable can be set:
SET MAPSERVER_HOME=D:\Temp\DLLs
And the mapscript init.py file will have the following added:
See Toblerity/Fiona#851 which has the same problem.
The text was updated successfully, but these errors were encountered: