[Git][debian-gis-team/python-mapnik][master] Add patch to not use deprecated distutils module.
Bas Couwenberg (@sebastic)
gitlab at salsa.debian.org
Mon Feb 20 14:06:58 GMT 2023
Bas Couwenberg pushed to branch master at Debian GIS Project / python-mapnik
Commits:
aa54f77d by Bas Couwenberg at 2023-02-20T15:06:48+01:00
Add patch to not use deprecated distutils module.
- - - - -
3 changed files:
- debian/changelog
- + debian/patches/no-distutils.patch
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,6 +1,7 @@
python-mapnik (1:0.0~20200224-7da019cf9-5) UNRELEASED; urgency=medium
* Bump Standards-Version to 4.6.2, no changes.
+ * Add patch to not use deprecated distutils module.
-- Bas Couwenberg <sebastic at debian.org> Wed, 18 Jan 2023 17:16:28 +0100
=====================================
debian/patches/no-distutils.patch
=====================================
@@ -0,0 +1,66 @@
+Description: Don't use deprecated distutils module.
+Author: Bas Couwenberg <sebastic at debian.org>
+Forwarded: https://github.com/mapnik/python-mapnik/pull/267
+
+--- a/build.py
++++ b/build.py
+@@ -1,7 +1,7 @@
+ import glob
++import sysconfig
+ import os
+ from subprocess import Popen, PIPE
+-from distutils import sysconfig
+
+ Import('env')
+
+@@ -14,11 +14,15 @@ def call(cmd, silent=True):
+
+
+ prefix = env['PREFIX']
+-target_path = os.path.normpath(sysconfig.get_python_lib() + os.path.sep + env['MAPNIK_NAME'])
++if "deb_system" in sysconfig.get_scheme_names():
++ python_modules_dir = sysconfig.get_path("purelib", "deb_system")
++else:
++ python_modules_dir = sysconfig.get_path("purelib")
++target_path = os.path.normpath(python_modules_dir + os.path.sep + env['MAPNIK_NAME'])
+
+ py_env = env.Clone()
+
+-py_env.Append(CPPPATH = sysconfig.get_python_inc())
++py_env.Append(CPPPATH = sysconfig.get_path('include'))
+
+ py_env.Append(CPPDEFINES = env['LIBMAPNIK_DEFINES'])
+
+--- a/setup.py
++++ b/setup.py
+@@ -7,7 +7,6 @@ import shutil
+ import subprocess
+ import sys
+ import glob
+-from distutils import sysconfig
+ from ctypes.util import find_library
+
+ from setuptools import Command, Extension, setup
+@@ -84,22 +83,6 @@ class WhichBoostCommand(Command):
+ print("\n".join(get_boost_library_names()))
+
+
+-cflags = sysconfig.get_config_var('CFLAGS')
+-sysconfig._config_vars['CFLAGS'] = re.sub(
+- ' +', ' ', cflags.replace('-g ', '').replace('-Os', '').replace('-arch i386', ''))
+-opt = sysconfig.get_config_var('OPT')
+-sysconfig._config_vars['OPT'] = re.sub(
+- ' +', ' ', opt.replace('-g ', '').replace('-Os', ''))
+-ldshared = sysconfig.get_config_var('LDSHARED')
+-sysconfig._config_vars['LDSHARED'] = re.sub(
+- ' +', ' ', ldshared.replace('-g ', '').replace('-Os', '').replace('-arch i386', ''))
+-ldflags = sysconfig.get_config_var('LDFLAGS')
+-sysconfig._config_vars['LDFLAGS'] = re.sub(
+- ' +', ' ', ldflags.replace('-g ', '').replace('-Os', '').replace('-arch i386', ''))
+-pycflags = sysconfig.get_config_var('PY_CFLAGS')
+-sysconfig._config_vars['PY_CFLAGS'] = re.sub(
+- ' +', ' ', pycflags.replace('-g ', '').replace('-Os', '').replace('-arch i386', ''))
+-sysconfig._config_vars['CFLAGSFORSHARED'] = ''
+ os.environ['ARCHFLAGS'] = ''
+
+ if os.environ.get("MASON_BUILD", "false") == "true":
=====================================
debian/patches/series
=====================================
@@ -2,3 +2,4 @@ skip-tests-for-missing-data.patch
boost1.71.patch
proj6-apis.patch
proj6-syntax.patch
+no-distutils.patch
View it on GitLab: https://salsa.debian.org/debian-gis-team/python-mapnik/-/commit/aa54f77d58134255f7888eeb42e6a37a01761925
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/python-mapnik/-/commit/aa54f77d58134255f7888eeb42e6a37a01761925
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/20230220/328013b7/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list