Your message dated Sun, 16 Jun 2024 15:04:34 +0000
with message-id <[email protected]>
and subject line Bug#1067163: fixed in mapnik 3.1.0+ds-8
has caused the Debian Bug report #1067163,
regarding mapnik: Fails to build with Python 3.12
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
1067163: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1067163
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Source: mapnik
Version: 3.1.0+ds-7
Severity: normal
Tags: patch
X-Debbugs-Cc: [email protected]

Dear Maintainer,

mapnik fails to build on Ubuntu with Python 3.12 due to the Scons
version in the package. I applied the attached patch to Ubuntu to use
the scons Debian package.

-- 
Benjamin Drung
Debian & Ubuntu Developer
diff -Nru mapnik-3.1.0+ds/debian/changelog mapnik-3.1.0+ds/debian/changelog
--- mapnik-3.1.0+ds/debian/changelog    2024-03-02 13:14:12.000000000 +0100
+++ mapnik-3.1.0+ds/debian/changelog    2024-03-19 16:40:34.000000000 +0100
@@ -1,3 +1,10 @@
+mapnik (3.1.0+ds-7ubuntu1) noble; urgency=medium
+
+  * Use scons from the Debian package (for Python 3.12 support)
+  * Cherry-pick SConstruct upstream changes for Scons >= 4.1.0
+
+ -- Benjamin Drung <[email protected]>  Tue, 19 Mar 2024 16:40:34 +0100
+
 mapnik (3.1.0+ds-7) unstable; urgency=medium
 
   * Add dpkg-dev (>= 1.22.5) to build dependencies for t64 changes.
diff -Nru mapnik-3.1.0+ds/debian/control mapnik-3.1.0+ds/debian/control
--- mapnik-3.1.0+ds/debian/control      2024-03-02 13:14:02.000000000 +0100
+++ mapnik-3.1.0+ds/debian/control      2024-03-19 16:39:54.000000000 +0100
@@ -31,6 +31,7 @@
                libxml2-dev,
                pkgconf,
                python3,
+               scons,
                zlib1g-dev
 Standards-Version: 4.6.2
 Vcs-Browser: https://salsa.debian.org/debian-gis-team/mapnik
diff -Nru mapnik-3.1.0+ds/debian/patches/series 
mapnik-3.1.0+ds/debian/patches/series
--- mapnik-3.1.0+ds/debian/patches/series       2023-11-16 19:00:05.000000000 
+0100
+++ mapnik-3.1.0+ds/debian/patches/series       2024-03-19 16:40:34.000000000 
+0100
@@ -1,7 +1,7 @@
 libxml2.patch
-Stop-using-custom-OrderedDict.patch
 proj.patch
 gcc-13.patch
 boost-1.81.patch
 boost-1.83-1.patch
 boost-1.83-2.patch
+Upgrade-to-Scons-4.1.0.patch
diff -Nru mapnik-3.1.0+ds/debian/patches/Stop-using-custom-OrderedDict.patch 
mapnik-3.1.0+ds/debian/patches/Stop-using-custom-OrderedDict.patch
--- mapnik-3.1.0+ds/debian/patches/Stop-using-custom-OrderedDict.patch  
2022-02-08 15:30:11.000000000 +0100
+++ mapnik-3.1.0+ds/debian/patches/Stop-using-custom-OrderedDict.patch  
1970-01-01 01:00:00.000000000 +0100
@@ -1,156 +0,0 @@
-Description: Stop using custom OrderedDict
- OrdredDict is in the standard library for all supported Python versions
- (2.7 and 3.5+) and has improvements over the ActiveState recipe version
- of OrderedDict we have been using. Switch to importing from collections
- instead of getting it from SCons.Util (tests already did this).
- .
- At the same time, reorganize the Util.py imports - import Iterable
- from collections.abc if possible (it is deprecated to import
- it from collections, will stop working in 3.8); try getting the
- User{Dict,List,String} from collections if possible - that is, try the
- 3.x way first.
-Author: Mats Wichmann <[email protected]>
-Origin: https://github.com/SCons/scons/commit/3fa7141ec7b39
-Forwarded: https://github.com/mapnik/mapnik/pull/4294
-Applied-Upstream: 
https://github.com/mapnik/mapnik/commit/7da9009e7ffffb0b9429890f6f13fee837ac320f
-
---- a/scons/scons-local-3.0.1/SCons/Action.py
-+++ b/scons/scons-local-3.0.1/SCons/Action.py
-@@ -107,6 +107,7 @@ import sys
- import subprocess
- import itertools
- import inspect
-+from collections import OrderedDict
- 
- import SCons.Debug
- from SCons.Debug import logInstanceCreation
-@@ -1289,7 +1290,7 @@ class ListAction(ActionBase):
-         return result
- 
-     def get_varlist(self, target, source, env, executor=None):
--        result = SCons.Util.OrderedDict()
-+        result = OrderedDict()
-         for act in self.list:
-             for var in act.get_varlist(target, source, env, executor):
-                 result[var] = True
---- a/scons/scons-local-3.0.1/SCons/Tool/javac.py
-+++ b/scons/scons-local-3.0.1/SCons/Tool/javac.py
-@@ -34,6 +34,7 @@ __revision__ = "src/engine/SCons/Tool/ja
- 
- import os
- import os.path
-+from collections import OrderedDict
- 
- import SCons.Action
- import SCons.Builder
-@@ -70,7 +71,7 @@ def emit_java_classes(target, source, en
-         if isinstance(entry, SCons.Node.FS.File):
-             slist.append(entry)
-         elif isinstance(entry, SCons.Node.FS.Dir):
--            result = SCons.Util.OrderedDict()
-+            result = OrderedDict()
-             dirnode = entry.rdir()
-             def find_java_files(arg, dirpath, filenames):
-                 java_files = sorted([n for n in filenames
---- a/scons/scons-local-3.0.1/SCons/Util.py
-+++ b/scons/scons-local-3.0.1/SCons/Util.py
-@@ -37,21 +37,18 @@ import pprint
- PY3 = sys.version_info[0] == 3
- 
- try:
-+    from collections import UserDict, UserList, UserString
-+except ImportError:
-     from UserDict import UserDict
--except ImportError as e:
--    from collections import UserDict
--
--try:
-     from UserList import UserList
--except ImportError as e:
--    from collections import UserList
--
--from collections import Iterable
-+    from UserString import UserString
- 
- try:
--    from UserString import UserString
--except ImportError as e:
--    from collections import UserString
-+    from collections.abc import Iterable
-+except ImportError:
-+    from collections import Iterable
-+
-+from collections import OrderedDict
- 
- # Don't "from types import ..." these because we need to get at the
- # types module later to look for UnicodeType.
-@@ -63,7 +60,7 @@ MethodType      = types.MethodType
- FunctionType    = types.FunctionType
- 
- try:
--    unicode
-+    _ = type(unicode)
- except NameError:
-     UnicodeType = str
- else:
-@@ -1034,60 +1031,6 @@ class CLVar(UserList):
-     def __str__(self):
-         return ' '.join(self.data)
- 
--# A dictionary that preserves the order in which items are added.
--# Submitted by David Benjamin to ActiveState's Python Cookbook web site:
--#     http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/107747
--# Including fixes/enhancements from the follow-on discussions.
--class OrderedDict(UserDict):
--    def __init__(self, dict = None):
--        self._keys = []
--        UserDict.__init__(self, dict)
--
--    def __delitem__(self, key):
--        UserDict.__delitem__(self, key)
--        self._keys.remove(key)
--
--    def __setitem__(self, key, item):
--        UserDict.__setitem__(self, key, item)
--        if key not in self._keys: self._keys.append(key)
--
--    def clear(self):
--        UserDict.clear(self)
--        self._keys = []
--
--    def copy(self):
--        dict = OrderedDict()
--        dict.update(self)
--        return dict
--
--    def items(self):
--        return list(zip(self._keys, list(self.values())))
--
--    def keys(self):
--        return self._keys[:]
--
--    def popitem(self):
--        try:
--            key = self._keys[-1]
--        except IndexError:
--            raise KeyError('dictionary is empty')
--
--        val = self[key]
--        del self[key]
--
--        return (key, val)
--
--    def setdefault(self, key, failobj = None):
--        UserDict.setdefault(self, key, failobj)
--        if key not in self._keys: self._keys.append(key)
--
--    def update(self, dict):
--        for (key, val) in dict.items():
--            self.__setitem__(key, val)
--
--    def values(self):
--        return list(map(self.get, self._keys))
--
- class Selector(OrderedDict):
-     """A callable ordered dictionary that maps file suffixes to
-     dictionary values.  We preserve the order in which items are added
diff -Nru mapnik-3.1.0+ds/debian/patches/Upgrade-to-Scons-4.1.0.patch 
mapnik-3.1.0+ds/debian/patches/Upgrade-to-Scons-4.1.0.patch
--- mapnik-3.1.0+ds/debian/patches/Upgrade-to-Scons-4.1.0.patch 1970-01-01 
01:00:00.000000000 +0100
+++ mapnik-3.1.0+ds/debian/patches/Upgrade-to-Scons-4.1.0.patch 2024-03-19 
16:39:54.000000000 +0100
@@ -0,0 +1,56 @@
+From: Artem Pavlenko <[email protected]>
+Date: Fri, 5 Mar 2021 10:18:26 +0000
+Subject: Upgrade to Scons 4.1.0
+
+Origin: upstream, 
https://github.com/mapnik/mapnik/commit/84a05a6597a941acfad220dae3fbfe5d20bfeb26
+---
+ SConstruct | 14 --------------
+ 1 file changed, 14 deletions(-)
+
+diff --git a/SConstruct b/SConstruct
+index b48c4d1..357ec05 100644
+--- a/SConstruct
++++ b/SConstruct
+@@ -128,7 +128,6 @@ PLUGINS = { # plugins with external dependencies
+ 
+ def init_environment(env):
+     env.Decider('MD5-timestamp')
+-    env.SourceCode(".", None)
+     if os.environ.get('RANLIB'):
+         env['RANLIB'] = os.environ['RANLIB']
+     if os.environ.get('AR'):
+@@ -317,7 +316,6 @@ opts.AddVariables(
+     BoolVariable('ENABLE_GLIBC_WORKAROUND', "Workaround known GLIBC symbol 
exports to allow building against libstdc++-4.8 without binaries needing 
throw_out_of_range_fmt", 'False'),
+     # http://www.scons.org/wiki/GoFastButton
+     # 
http://stackoverflow.com/questions/1318863/how-to-optimize-an-scons-script
+-    BoolVariable('FAST', "Make SCons faster at the cost of less precise 
dependency tracking", 'False'),
+     BoolVariable('PRIORITIZE_LINKING', 'Sort list of lib and inc directories 
to ensure preferential compiling and linking (useful when duplicate libs)', 
'True'),
+     ('LINK_PRIORITY','Priority list in which to sort library and include 
paths (default order is internal, other, frameworks, user, then system - see 
source of `sort_paths` function for more 
detail)',','.join(DEFAULT_LINK_PRIORITY)),
+ 
+@@ -1249,12 +1247,7 @@ def GetMapnikLibVersion():
+     return version_string
+ 
+ if not preconfigured:
+-
+     color_print(4,'Configuring build environment...')
+-
+-    if not env['FAST']:
+-        SetCacheMode('force')
+-
+     if env['USE_CONFIG']:
+         if not env['CONFIG'].endswith('.py'):
+             color_print(1,'SCons CONFIG file specified is not a python file, 
will not be read...')
+@@ -2109,13 +2102,6 @@ if not HELP_REQUESTED:
+ 
+     Export('plugin_base')
+ 
+-    if env['FAST']:
+-        # caching is 'auto' by default in SCons
+-        # But let's also cache implicit deps...
+-        EnsureSConsVersion(0,98)
+-        SetOption('implicit_cache', 1)
+-        SetOption('max_drift', 1)
+-
+     # Build agg first, doesn't need anything special
+     if env['RUNTIME_LINK'] == 'shared':
+         SConscript('deps/agg/build.py')
diff -Nru mapnik-3.1.0+ds/debian/rules mapnik-3.1.0+ds/debian/rules
--- mapnik-3.1.0+ds/debian/rules        2023-08-12 21:20:52.000000000 +0200
+++ mapnik-3.1.0+ds/debian/rules        2024-03-19 16:39:54.000000000 +0100
@@ -29,7 +29,7 @@
 endif
 
 # scons flags
-SCONS = python3 $(CURDIR)/scons/scons.py
+SCONS = /usr/bin/scons
 SCONS_FLAGS := $(NJOBS)
 # -O2
 SCONS_FLAGS += OPTIMIZATION=2

--- End Message ---
--- Begin Message ---
Source: mapnik
Source-Version: 3.1.0+ds-8
Done: Bas Couwenberg <[email protected]>

We believe that the bug you reported is fixed in the latest version of
mapnik, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Bas Couwenberg <[email protected]> (supplier of updated mapnik package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sun, 16 Jun 2024 16:39:50 +0200
Source: mapnik
Architecture: source
Version: 3.1.0+ds-8
Distribution: unstable
Urgency: medium
Maintainer: Debian GIS Project <[email protected]>
Changed-By: Bas Couwenberg <[email protected]>
Closes: 1067163 1073332
Changes:
 mapnik (3.1.0+ds-8) unstable; urgency=medium
 .
   * Add patch to fix FTBFS with Python 3.12.
     (closes: #1067163)
   * Add patch to fix FTBFS with libxml2 2.12.
     (closes: #1073332)
Checksums-Sha1:
 fbf5c5be72227e822b15ce2f327dfb082a4bfbc5 2640 mapnik_3.1.0+ds-8.dsc
 fa6c58c2333b3600b6bb2e474df2c79a7fef86af 39028 mapnik_3.1.0+ds-8.debian.tar.xz
 4861feb55c39dd8563641e75950e50e1c7ef34db 17001 
mapnik_3.1.0+ds-8_amd64.buildinfo
Checksums-Sha256:
 65d2ab0a913598f45a33a9b9e5c30eff3b55b8a59fc71ba509b26b736b7c6e60 2640 
mapnik_3.1.0+ds-8.dsc
 ad327485d872a1e4e8b195fec1e1eb71c0934ed135a1a0b80a4896c4227ed4cd 39028 
mapnik_3.1.0+ds-8.debian.tar.xz
 88fe06d717e22f0f25b639f8ca50c5d1bd835a0d87f666ba58bd59065891a8e6 17001 
mapnik_3.1.0+ds-8_amd64.buildinfo
Files:
 01f91bee8c56e509eb1c966ee09a5f1f 2640 libs optional mapnik_3.1.0+ds-8.dsc
 8ef0ca0ee5cc843cb0fdb620f2c7cc0f 39028 libs optional 
mapnik_3.1.0+ds-8.debian.tar.xz
 cb15f594c833706856bab0c26856a946 17001 libs optional 
mapnik_3.1.0+ds-8_amd64.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEgYLeQXBWQI1hRlDRZ1DxCuiNSvEFAmZu+oUACgkQZ1DxCuiN
SvGRyA//UDI6StJTbkc580KM7/NZ49oCeEp0RX47x2nzQiEBGSd6SsqkQeRAtIux
xGdURQWgqBtc7GIf85X98D9rrMWJvpi/9c6MIMXdpCtcQ65kdDdbRW3tYiLwkx8v
CX4zD7/zSYLzuo2MURJwX32BxE0WLXjF7PuQNhCpGbr36F9z3549C9cKNNvTIYuD
ROgttTbIVopjdnvDdlnGvlrt4SxfuE9nUDqHeqmoUEzCebGTZFIJ48znePKWYUtn
Wo0s5GhGl1jVnJW7CSyg3hWDk4L8XlrdediQvH1OniO5RQrv2YllFkMBF6ZuL/wa
hMIGG5B7V4ZJvSfiRkocxIJNu+OLRlOALpHE9ntUkE67Vehbs5H0MKIBl+RFYQgC
N+yZ9yz1SiA+XGIXU1N47UqJvtM83gQfgsIuYSKNMOd2QswQOZHDAIkqPCThUv5m
b7a+3btGS2Ul4DLPctF7JU7+60kBSkUlH3kd3BSy1hhMC1XXqxtp/1H5LMbygge7
oAFHNFZNClDOymIjw8+e3U3WGN20Cb5CPwzjJ309pnCf6ZLfqLIvvScpPAgsvt78
8ACWddzeBy0WVozW1jJQzSFOcMykkj0wGzAHtvjxoIdPprbRQ5bhH8uUBAKGWRaF
2s/Icl7l07TXOBB+OwcwJ9OCyirerr+uF8CVqJuvcNuHQxeWKB8=
=PGHh
-----END PGP SIGNATURE-----

Attachment: pgpe1spTKv9AS.pgp
Description: PGP signature


--- End Message ---
_______________________________________________
Pkg-grass-devel mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-grass-devel

Reply via email to