Skip to content
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

Windows MapScript for Conda build #7105

Merged
merged 14 commits into from
Jul 10, 2024
Merged

Conversation

hobu
Copy link
Contributor

@hobu hobu commented Jul 9, 2024

Follow up to #7102 to add MapScript builds as well on all three platforms

@hobu hobu requested a review from geographika July 9, 2024 20:30
@geographika
Copy link
Member

Thanks @hobu !

Note to self: shell-paths for converting slashes in paths dependent on OS.

@@ -1,5 +1,14 @@
#!/bin/sh

if [ "$RUNNER_OS" == "Windows" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is weird that we have to explicitly specify SWIG_EXECUTABLE. We don't need to do that for GDAL builds

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could probably be removed. It was in the mapserver feedstock and I carried it along from there.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could probably be removed

indeed: #7109

@rouault rouault merged commit c66de90 into MapServer:main Jul 10, 2024
16 checks passed
@hobu
Copy link
Contributor Author

hobu commented Jul 10, 2024

Note to self: shell-paths for converting slashes in paths dependent on OS.

IMO the Python MapScript install stuff should be refactored to use "modern" Python packaging installation stuff instead of hand copying files around to paths. Some of the items that would entail include:

  • A proper MANIFEST.in file to describe the examples and data and such that should be installed with Python MapScript
  • Use pyproject.toml for all of the package metadata (readme, version, etc)
  • Proper rpath'ing to get rid of MAPSERVER_DLL_PATH (and the rest of the dirty hackery in __init__.py)

@geographika
Copy link
Member

@hobu - there are definitely some improvements that can be made such as a move to a .toml file, but I'm not sure if there is a "clean" way when building with a combination of SWIG, CMake, and Python packaging.

Setting MAPSERVER_DLL_PATH is required on Windows to allow the MapServer DLLs to be referenced from MapScript - see #6101.
Including the mapserver/bin folder on the system PATH no longer works since Python 3.8.

GDAL also relies on several path manipulations in https://github.com/rouault/gdal/blob/master/swig/python/osgeo/__init__.py

Copying files with CMake is required to gather the files from the source repository such as tests so they can be alongside the SWIG generated .py file and a .pyd file and added to the wheel.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants