Your message dated Wed, 17 Apr 2024 18:10:13 +0000
with message-id <[email protected]>
and subject line Bug#1067163: fixed in mapnik 4.0.0~rc1+ds-1~exp1
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: 4.0.0~rc1+ds-1~exp1
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: Tue, 16 Apr 2024 12:39:31 +0200
Source: mapnik
Binary: libmapnik-dev libmapnik4.0.0 libmapnik4.0.0-dbgsym mapnik-doc 
mapnik-utils mapnik-utils-dbgsym
Architecture: source amd64 all
Version: 4.0.0~rc1+ds-1~exp1
Distribution: experimental
Urgency: medium
Maintainer: Debian GIS Project <[email protected]>
Changed-By: Bas Couwenberg <[email protected]>
Description:
 libmapnik-dev - C++ toolkit for developing GIS applications (devel)
 libmapnik4.0.0 - C++ toolkit for developing GIS applications (libraries)
 mapnik-doc - C++ toolkit for developing GIS applications (doc)
 mapnik-utils - C++ toolkit for developing GIS applications (utilities)
Closes: 1067163
Changes:
 mapnik (4.0.0~rc1+ds-1~exp1) experimental; urgency=medium
 .
   * New upstream release candidate.
   * Add patch to fix FTBFS with Python 3.12.
     (closes: #1067163)
   * Exclude scons subdirectory from repacked upstream tarball.
   * Update copyright file.
   * Drop patches, fixed/included upstream.
   * Use cmake buildsystem instead of scons.
   * Rename library package for SONAME bump.
   * Add patch to install headers under /usr/include/mapnik.
Checksums-Sha1:
 647a00d4e36757c80c467b4d40529edc1b2e51b3 2767 mapnik_4.0.0~rc1+ds-1~exp1.dsc
 0e09738a27427294932c8936e7473724d1bc09f4 3565740 
mapnik_4.0.0~rc1+ds.orig.tar.xz
 87fcbd5ce3438a7d21175f1d95b0270a71a27213 18516 
mapnik_4.0.0~rc1+ds-1~exp1.debian.tar.xz
 64fac76a266037e9e2b8f4e23363e6e66f2f92db 666284 
libmapnik-dev_4.0.0~rc1+ds-1~exp1_amd64.deb
 eb0af2dbb5058b71a52df2cc9098b441e24b7954 86372956 
libmapnik4.0.0-dbgsym_4.0.0~rc1+ds-1~exp1_amd64.deb
 4a1ffd24d805dbe3a78ed2762dddf694870b081f 2906860 
libmapnik4.0.0_4.0.0~rc1+ds-1~exp1_amd64.deb
 d95f501590fba5d15ca4ae16deba20821610b799 1581160 
mapnik-doc_4.0.0~rc1+ds-1~exp1_all.deb
 5d3f54392908d6f2fa87ba898606b613d98ebf8c 7725984 
mapnik-utils-dbgsym_4.0.0~rc1+ds-1~exp1_amd64.deb
 72a24b055116f6a95c2305dc81e27244504e123c 343568 
mapnik-utils_4.0.0~rc1+ds-1~exp1_amd64.deb
 7c7fc47102ff61dd46a2841069a6369a7fcd2bb5 18417 
mapnik_4.0.0~rc1+ds-1~exp1_amd64.buildinfo
Checksums-Sha256:
 45fbe56ab142e8295c64ea463b516dcf1de42df9474335adb4f73a225578f6da 2767 
mapnik_4.0.0~rc1+ds-1~exp1.dsc
 55debbe1b6894b613440dbb7d737bc5b3df21a0834372b80c5fc14d649a634e9 3565740 
mapnik_4.0.0~rc1+ds.orig.tar.xz
 a3681ad077d08b9de9d7c33179b4b3db64450c8799b62dcca10c51bbabd73e75 18516 
mapnik_4.0.0~rc1+ds-1~exp1.debian.tar.xz
 f169b8397655803ec86fd499c1b5174d290cc57d5162e4dd83fb453494e14a43 666284 
libmapnik-dev_4.0.0~rc1+ds-1~exp1_amd64.deb
 928a900232ef6bcc3123a13b3087a7ad01c656c740d721714a758924b6b72183 86372956 
libmapnik4.0.0-dbgsym_4.0.0~rc1+ds-1~exp1_amd64.deb
 a1c340ae0ef166ade495112190e084075581b87c7d451832b583d74bedb20848 2906860 
libmapnik4.0.0_4.0.0~rc1+ds-1~exp1_amd64.deb
 6bf290a9159e411decb70b3d600930a6b83ebe991daae472f044713baa34747c 1581160 
mapnik-doc_4.0.0~rc1+ds-1~exp1_all.deb
 9cababb4c975f2f2fb2c3f779cdfb3be8ca92c852b174c6c3202b64f38312c18 7725984 
mapnik-utils-dbgsym_4.0.0~rc1+ds-1~exp1_amd64.deb
 3ded8a1027c842dcd671346b94bf8160aeef07398f97bb7c773909912bdf1253 343568 
mapnik-utils_4.0.0~rc1+ds-1~exp1_amd64.deb
 01dcbf2ae8066320d3e8d297fa5a50b79e04747cf4eb5b90cf970619a0659469 18417 
mapnik_4.0.0~rc1+ds-1~exp1_amd64.buildinfo
Files:
 9e234745c841e30ad7af570ede20cb91 2767 libs optional 
mapnik_4.0.0~rc1+ds-1~exp1.dsc
 0b9c8ec9aa39932c20b562a143e9048d 3565740 libs optional 
mapnik_4.0.0~rc1+ds.orig.tar.xz
 53e2f70f07f56451f8f9dbd1cc7c5133 18516 libs optional 
mapnik_4.0.0~rc1+ds-1~exp1.debian.tar.xz
 c47b6fa2e1da54900f3a373d3de7ff7c 666284 libdevel optional 
libmapnik-dev_4.0.0~rc1+ds-1~exp1_amd64.deb
 b98bfb8ed585b85e2c603e0c56c72e42 86372956 debug optional 
libmapnik4.0.0-dbgsym_4.0.0~rc1+ds-1~exp1_amd64.deb
 912fdf97e1bebb65577211058d473c89 2906860 libs optional 
libmapnik4.0.0_4.0.0~rc1+ds-1~exp1_amd64.deb
 7caf81fce75d24fa11c1476400c26d58 1581160 doc optional 
mapnik-doc_4.0.0~rc1+ds-1~exp1_all.deb
 141e162099af66210d8da12e93db0a95 7725984 debug optional 
mapnik-utils-dbgsym_4.0.0~rc1+ds-1~exp1_amd64.deb
 34dff9900bb3900fe64bd300bc87b390 343568 utils optional 
mapnik-utils_4.0.0~rc1+ds-1~exp1_amd64.deb
 f4a29df01386d50f1670f7174761617e 18417 libs optional 
mapnik_4.0.0~rc1+ds-1~exp1_amd64.buildinfo

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

iQIzBAEBCgAdFiEEgYLeQXBWQI1hRlDRZ1DxCuiNSvEFAmYeWbkACgkQZ1DxCuiN
SvH0Jg//VGaUmVZlH4Xpjubnevric815uvd4GMf7njbj+r5NbmsfocNXA0MUK9tn
VF+a87gGb8tR91OAEnqt9ityvD2ZDMDcvih1qV57jYb4+lPRLu86ZhwONcRUkMFt
AIQxI2Yz3+1YNB1LevLBRyojJDNi9ujntq2TQRmIclzWKx+T9DAdeR07J7Y5wLAq
OXM6qIrSKMQnuD12BboJ+YmMJUwts4i1xmlX+eakVKVh6WvqSrOrLbiGBj8wShAE
4hH3vbBOfStH8AzdlCysZyrQb94+vG1KxyPsOuv7ntRtzrNkuvvACKvfK2uYKmmz
W1TDT5UBuBwOu6MqDFawMo4eSuJZ2LWS3DryKXuTD4n5DxOYkZHtmv1yZvvhjd76
QNUKbAA+dQA64+m/FGvHaH+g0cDnfwZ40HnHMmYRGxse+NtLC3DNzpssElJrE5or
V7/xxkmU6ErK+YoOU6ltEO7FBh99CN5in1/aZdzkwcyCr1QpuvG/2Z7WtvYHPlCv
hQ0LeZKF4gh9+pjBCPsVw3kFTO7fR2nYgVaddEW0r0xaEahDQsarNcuHOOx11Hh1
S5HgrZYg0seXudqVJdZCqRkR+Gu75l6+yivU64rC0CmhqxLjBg4bk4Xd3Gjr8EcQ
hwNqo6oEsecKmspS+my7YvlPJ1o5Tdf3p6sJaaTBnAISM2QuTvA=
=7OLV
-----END PGP SIGNATURE-----

Attachment: pgp3xIIrzFlOe.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