[Git][debian-gis-team/mapproxy][experimental] 5 commits: New upstream version 5.0.0+dfsg

Bas Couwenberg (@sebastic) gitlab at salsa.debian.org
Wed Jun 18 15:43:23 BST 2025



Bas Couwenberg pushed to branch experimental at Debian GIS Project / mapproxy


Commits:
9075781f by Bas Couwenberg at 2025-06-18T16:32:29+02:00
New upstream version 5.0.0+dfsg
- - - - -
ba86506a by Bas Couwenberg at 2025-06-18T16:32:31+02:00
Update upstream source from tag 'upstream/5.0.0+dfsg'

Update to upstream version '5.0.0+dfsg'
with Debian dir 77e0f2862ba12f28b48c8ea460d9380127840ff1
- - - - -
14e7fcfc by Bas Couwenberg at 2025-06-18T16:32:42+02:00
New upstream release.

- - - - -
58969c6a by Bas Couwenberg at 2025-06-18T16:37:41+02:00
Drop python3-{lxml,shapely} from Recommends, now part of ${python3:Depends}.

Move python3-gdal from Recommends to Depends.

- - - - -
7b9cc5c2 by Bas Couwenberg at 2025-06-18T16:38:04+02:00
Set distribution to experimental.

- - - - -


11 changed files:

- CHANGES.txt
- Dockerfile
- Dockerfile-alpine
- debian/changelog
- debian/control
- doc/install.rst
- docker/run-nginx.sh
- docker/uwsgi.conf
- mapproxy/config/loader.py
- mapproxy/featureinfo.py
- setup.py


Changes:

=====================================
CHANGES.txt
=====================================
@@ -1,3 +1,21 @@
+5.0.0 2025-06-18
+~~~~~~~~~~~~~~~~
+
+Breaking:
+
+  - The dependencies lxml, shapely, pyproj, gdal and PyYAML are no longer optional
+
+Maintenance:
+
+  - By default lxml, shapely, pyproj, Pillow and PyYAML are now installed via pip and are not recommended to be installed
+    as apt packages anymore
+
+Fixes:
+
+  - The alpine image uses the python3 plugin for uwsgi correctly
+  - An lxml encoding error is fixed
+
+
 4.1.2 2025-05-27
 ~~~~~~~~~~~~~~~~
 


=====================================
Dockerfile
=====================================
@@ -3,13 +3,8 @@ FROM python:3.12-slim-bookworm AS base-libs
 LABEL maintainer="mapproxy.org"
 
 RUN apt update && apt -y install --no-install-recommends \
-  python3-pil \
-  python3-yaml \
-  python3-pyproj \
   libgeos-dev \
-  python3-lxml \
   libgdal-dev \
-  python3-shapely \
   libxml2-dev \
   libxslt-dev && \
   apt-get -y --purge autoremove && \
@@ -48,7 +43,9 @@ ENV PATH="${PATH}:/mapproxy/.local/bin"
 RUN mkdir mapproxy-dist
 COPY --from=builder /mapproxy/dist/* mapproxy-dist/
 
-RUN pip install requests redis boto3 azure-storage-blob Shapely && \
+# Installing optional packages and MapProxy afterwards
+
+RUN pip install requests redis boto3 azure-storage-blob && \
   pip install --find-links=./mapproxy-dist --no-index MapProxy && \
   pip cache purge
 


=====================================
Dockerfile-alpine
=====================================
@@ -5,9 +5,6 @@ LABEL maintainer="mapproxy.org"
 RUN apk -U upgrade --update \
     && apk add \
       g++ \
-      py3-pip  \
-      gdal \
-      gdal-dev \
       gdal \
       gdal-dev \
       libxslt-dev \
@@ -50,7 +47,9 @@ ENV PATH="${PATH}:/mapproxy/.local/bin"
 RUN mkdir mapproxy-dist
 COPY --from=builder /mapproxy/dist/* mapproxy-dist/
 
-RUN pip install requests redis boto3 azure-storage-blob Shapely && \
+# Installing optional packages and MapProxy afterwards
+
+RUN pip install requests redis boto3 azure-storage-blob && \
   pip install --find-links=./mapproxy-dist --no-index MapProxy && \
   pip cache purge
 
@@ -79,6 +78,8 @@ FROM base AS nginx
 # use current version of nginx
 ARG NGINX_VERSION=1.25.3
 
+ENV MAPPROXY_ALPINE=true
+
 USER root:root
 
 RUN apk --no-cache add ca-certificates uwsgi uwsgi-python3 supervisor pcre-dev && \


=====================================
debian/changelog
=====================================
@@ -1,3 +1,12 @@
+mapproxy (5.0.0+dfsg-1~exp1) experimental; urgency=medium
+
+  * New upstream release.
+  * Drop python3-{lxml,shapely} from Recommends,
+    now part of ${python3:Depends}.
+  * Move python3-gdal from Recommends to Depends.
+
+ -- Bas Couwenberg <sebastic at debian.org>  Wed, 18 Jun 2025 16:37:43 +0200
+
 mapproxy (4.1.2+dfsg-1~exp1) experimental; urgency=medium
 
   * New upstream release.


=====================================
debian/control
=====================================
@@ -50,16 +50,14 @@ Description: open source proxy for geospatial data
 Package: python3-mapproxy
 Architecture: all
 Depends: fonts-dejavu-core,
+         python3-gdal,
          ${python3:Depends},
          ${misc:Depends}
 Recommends: python3-azure-storage,
             python3-boto3,
             python3-botocore,
-            python3-gdal,
-            python3-lxml,
             python3-pastedeploy,
-            python3-redis,
-            python3-shapely
+            python3-redis
 Description: open source proxy for geospatial data - Python 3 module
  MapProxy is an open source proxy for geospatial data. It caches, accelerates
  and transforms data from existing map services and serves any desktop or web


=====================================
doc/install.rst
=====================================
@@ -41,64 +41,22 @@ Install Dependencies
 
 MapProxy is written in Python, thus you will need a working Python installation. MapProxy works with Python 3.9 or higher, which should already be installed with most Linux distributions.
 
-MapProxy requires a few third-party libraries that are required to run. There are different ways to install each dependency. Read :ref:`dependency_details` for a list of all required and optional dependencies.
+MapProxy requires a few third-party libraries that are required to run.
 
 Installation
 ^^^^^^^^^^^^
 
 On a Debian or Ubuntu system, you need to install the following packages::
 
-  sudo apt-get install python3-pil python3-yaml python3-pyproj
+  sudo apt-get install libgeos-dev libgdal-dev libxml2-dev libxslt-dev
 
-To get all optional packages::
+Additional dependencies are installed automatically via pip when running `pip install MapProxy`. It is possible to use
+apt packages for some dependencies instead, pip will detect them if they are already installed and can be used. The apt
+packages will only work if the python version you are using is the same as the system wide installed python. The system
+packages can be quite old, so this is **not recommended**::
 
-  sudo apt-get install libgeos-dev python3-lxml libgdal-dev python3-dev python3-shapely
+  sudo apt-get install python3-dev python3-pil python3-yaml python3-pyproj python3-lxml python3-shapely
 
-.. _dependency_details:
-
-Dependency details
-^^^^^^^^^^^^^^^^^^
-
-pyproj or libproj
-~~~~~~~~~~~~~~~~~
-
-MapProxy uses the PROJ C library for all coordinate transformation tasks. MapProxy can directly use the C library or via the pyproj Python package.
-The internal API of PROJ was updated with PROJ >=5. The old PROJ 4 API is now deprecated and will be removed from future PROJ releases. MapProxy only supports the new API via pyproj and it is therefore recommended to use a recent pyproj version.
-
-
-.. versionchanged:: 1.13
-  Support for new PROJ API via pyproj.
-
-
-.. _dependencies_pil:
-
-Pillow
-~~~~~~
-Pillow, the successor of the Python Image Library (PIL), is used for the image processing and it is included in most distributions as ``python-pil`` or ``python-imaging``. Please make sure that you have Pillow installed as MapProxy is no longer compatible with the original PIL. The version of ``python-imaging`` should be >=3.1.
-
-You can install a new version of Pillow from source with::
-
-  sudo apt-get install build-essential python-dev libjpeg-dev \
-    zlib1g-dev libfreetype6-dev
-  pip install Pillow
-
-
-Shapely and GEOS *(optional)*
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-You will need Shapely to use the :doc:`coverage feature <coverages>` of MapProxy. Shapely offers Python bindings for the GEOS library. You need Shapely (``python-shapely``) and GEOS (``libgeos-dev``). You can install Shapely as a Python package with ``pip install Shapely`` if you system does not provide a recent (>= 1.8) version of Shapely.
-
-GDAL *(optional)*
-~~~~~~~~~~~~~~~~~
-The :doc:`coverage feature <coverages>` allows you to read geometries from OGR datasources (Shapefiles, PostGIS, etc.). This package is optional and only required for OGR datasource support (BBOX, WKT and GeoJSON coverages are supported natively). OGR is part of GDAL (``libgdal-dev``).
-
-.. _lxml_install:
-
-lxml *(optional)*
-~~~~~~~~~~~~~~~~~
-
-`lxml`_ is used for more advanced WMS FeatureInformation operations like XSL transformation or the concatenation of multiple XML/HTML documents. It is available as ``python-lxml``.
-
-.. _`lxml`: http://lxml.de
 
 Install MapProxy
 ----------------


=====================================
docker/run-nginx.sh
=====================================
@@ -6,8 +6,13 @@
 done=0
 trap 'done=1' TERM INT
 
+UWSGI_ADD_OPTIONS=""
+if [ -n "$MAPPROXY_ALPINE" ]; then
+  UWSGI_ADD_OPTIONS="--plugin python3"
+fi
+
 # run uswgi and nginx in parallel
-uwsgi --ini /mapproxy/uwsgi.conf &
+uwsgi $UWSGI_ADD_OPTIONS --ini /mapproxy/uwsgi.conf &
 echo "uswgi started"
 nginx &
 echo "nginx started"


=====================================
docker/uwsgi.conf
=====================================
@@ -3,7 +3,7 @@ master = true
 chdir = /mapproxy
 pyargv = /mapproxy/config/mapproxy.yaml
 wsgi-file = /mapproxy/app.py
-pidfile=/tmp/mapproxy.pid
+pidfile = /tmp/mapproxy.pid
 socket = 0.0.0.0:8080
 processes = 2
 threads = 10


=====================================
mapproxy/config/loader.py
=====================================
@@ -749,12 +749,10 @@ class WMSSourceConfiguration(SourceConfiguration):
         return WMSLegendSource([lg_client], legend_cache, static=True)
 
     def fi_xslt_transformer(self, conf, context):
-        from mapproxy.featureinfo import XSLTransformer, has_xslt_support
+        from mapproxy.featureinfo import XSLTransformer
         fi_transformer = None
         fi_xslt = conf.get('featureinfo_xslt')
         if fi_xslt:
-            if not has_xslt_support:
-                raise ValueError('featureinfo_xslt requires lxml. Please install.')
             fi_xslt = context.globals.abspath(fi_xslt)
             fi_format = conf.get('featureinfo_out_format')
             if not fi_format:
@@ -2098,12 +2096,10 @@ class LayerConfiguration(ConfigurationBase):
 
 
 def fi_xslt_transformers(conf, context):
-    from mapproxy.featureinfo import XSLTransformer, has_xslt_support
+    from mapproxy.featureinfo import XSLTransformer
     fi_transformers = {}
     fi_xslt = conf.get('featureinfo_xslt')
     if fi_xslt:
-        if not has_xslt_support:
-            raise ValueError('featureinfo_xslt requires lxml. Please install.')
         for info_type, fi_xslt in fi_xslt.items():
             fi_xslt = context.globals.abspath(fi_xslt)
             fi_transformers[info_type] = XSLTransformer(fi_xslt)


=====================================
mapproxy/featureinfo.py
=====================================
@@ -18,21 +18,15 @@ import copy
 import json
 
 from functools import reduce
-from io import StringIO
+from io import StringIO, BytesIO
 from typing import List, Union
 
-try:
-    from lxml import etree, html
-
-    has_xslt_support = True
-except ImportError:
-    has_xslt_support = False
-    etree = html = None
+from lxml import etree, html
 
 
 class FeatureInfoDoc(object):
     content_type = None
-    content: str = None
+    content: Union[str, bytes] = None
 
     def as_etree(self):
         raise NotImplementedError()
@@ -45,10 +39,10 @@ class TextFeatureInfoDoc(FeatureInfoDoc):
     info_type = "text"
 
     def __init__(self, content: Union[str, bytes]):
-        self.content = content if isinstance(content, str) else decode(content)
+        self.content = content
 
     def as_string(self) -> str:
-        return self.content
+        return self.content if isinstance(self.content, str) else decode(self.content)
 
     @classmethod
     def combine(cls, docs: List[FeatureInfoDoc]):
@@ -63,7 +57,7 @@ class XMLFeatureInfoDoc(FeatureInfoDoc):
 
     def __init__(self, content: Union[str, bytes]):
         if isinstance(content, (str, bytes)):
-            self.content = content if isinstance(content, str) else decode(content)
+            self.content = content
         else:
             if hasattr(content, "getroottree"):
                 content = content.getroottree()
@@ -73,7 +67,7 @@ class XMLFeatureInfoDoc(FeatureInfoDoc):
     def as_string(self):
         if self.content is None:
             self.content = self._serialize_etree()
-        return self.content
+        return self.content if isinstance(self.content, str) else decode(self.content)
 
     def as_etree(self):
         if self._etree is None:
@@ -86,7 +80,7 @@ class XMLFeatureInfoDoc(FeatureInfoDoc):
         return decode(etree.tostring(self._etree, encoding=encoding, xml_declaration=False), encoding)
 
     def _parse_content(self):
-        return etree.parse(StringIO(self.content))
+        return etree.parse(StringIO(self.content) if isinstance(self.content, str) else BytesIO(self.content))
 
     @classmethod
     def combine(cls, docs):
@@ -137,10 +131,10 @@ class JSONFeatureInfoDoc(FeatureInfoDoc):
     info_type = "json"
 
     def __init__(self, content):
-        self.content = content if isinstance(content, str) else decode(content)
+        self.content = content
 
     def as_string(self):
-        return self.content
+        return self.content if isinstance(self.content, str) else decode(self.content)
 
     @classmethod
     def combine(cls, docs):


=====================================
setup.py
=====================================
@@ -11,7 +11,9 @@ install_requires = [
     'Pillow>=9;python_version=="3.10"',
     'Pillow>=10;python_version=="3.11"',
     'Pillow>=10.1;python_version=="3.12"',
-    'Pillow>=11;python_version=="3.13"'
+    'Pillow>=11;python_version=="3.13"',
+    'lxml>=4',
+    'shapely>=2'
 ]
 
 
@@ -39,7 +41,7 @@ def long_description(changelog_releases=10):
 
 setup(
     name='MapProxy',
-    version="4.1.2",
+    version="5.0.0",
     description='An accelerating proxy for tile and web map services',
     long_description=long_description(7),
     long_description_content_type='text/x-rst',



View it on GitLab: https://salsa.debian.org/debian-gis-team/mapproxy/-/compare/14fd67c7350d0427d5bce8d74581c879876b21c9...7b9cc5c2d2ed8b0e97206064db11e4b5b3c1f298

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/mapproxy/-/compare/14fd67c7350d0427d5bce8d74581c879876b21c9...7b9cc5c2d2ed8b0e97206064db11e4b5b3c1f298
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20250618/6af08877/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list