[Git][debian-gis-team/aggdraw][master] Add patch to not use deprecated distutils module.
Bas Couwenberg (@sebastic)
gitlab at salsa.debian.org
Mon Feb 20 18:33:58 GMT 2023
Bas Couwenberg pushed to branch master at Debian GIS Project / aggdraw
Commits:
9ee3a3ce by Bas Couwenberg at 2023-02-20T19:28:32+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
=====================================
@@ -4,6 +4,7 @@ aggdraw (1.3.15-3) UNRELEASED; urgency=medium
* Enable numpy3 dh helper.
* Enable Salsa CI.
* Bump Standards-Version to 4.6.2, no changes.
+ * Add patch to not use deprecated distutils module.
-- Bas Couwenberg <sebastic at debian.org> Wed, 21 Dec 2022 20:29:16 +0100
=====================================
debian/patches/no-distutils.patch
=====================================
@@ -0,0 +1,45 @@
+Description: Don't use deprecated distutils module.
+Author: Bas Couwenberg <sebastic at debian.org>
+Forwarded: https://github.com/pytroll/aggdraw/pull/87
+
+--- a/setup.py
++++ b/setup.py
+@@ -16,13 +16,10 @@ import os
+ import sys
+ import subprocess
+ import platform
+-from distutils.sysconfig import get_config_var
+-from distutils.version import LooseVersion
++from sysconfig import get_config_var
+
+-try:
+- from setuptools import setup, Extension
+-except ImportError:
+- from distutils.core import setup, Extension
++from packaging.version import Version
++from setuptools import setup, Extension
+
+ VERSION = "1.3.15"
+
+@@ -48,9 +45,12 @@ def is_platform_mac():
+ # MACOSX_DEPLOYMENT_TARGET before calling setup.py
+ if is_platform_mac():
+ if 'MACOSX_DEPLOYMENT_TARGET' not in os.environ:
+- current_system = LooseVersion(platform.mac_ver()[0])
+- python_target = LooseVersion(get_config_var('MACOSX_DEPLOYMENT_TARGET'))
+- if python_target < '10.9' and current_system >= '10.9':
++ current_system = Version(platform.mac_ver()[0])
++ python_target = Version(get_config_var('MACOSX_DEPLOYMENT_TARGET'))
++ if (
++ python_target < Version('10.9') and
++ current_system >= Version('10.9')
++ ):
+ os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.9'
+
+
+--- /dev/null
++++ b/pyproject.toml
+@@ -0,0 +1,3 @@
++[build-system]
++requires = ["packaging", "setuptools"]
++build-backend = "setuptools.build_meta"
=====================================
debian/patches/series
=====================================
@@ -0,0 +1 @@
+no-distutils.patch
View it on GitLab: https://salsa.debian.org/debian-gis-team/aggdraw/-/commit/9ee3a3ce3d681bbe4d1a563d9e88244a3d9f8e94
--
View it on GitLab: https://salsa.debian.org/debian-gis-team/aggdraw/-/commit/9ee3a3ce3d681bbe4d1a563d9e88244a3d9f8e94
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/2022003e/attachment-0001.htm>
More information about the Pkg-grass-devel
mailing list