Control: tags 1022480 + patch
Control: tags 1022480 + pending

Dear maintainer,

I've prepared an NMU for python-peachpy (versioned as 
0.0~git20211013.257881e-1.1) and
uploaded it to DELAYED/2. Please feel free to tell me if I
should delay it longer.

Regards,

SR
diff -Nru python-peachpy-0.0~git20211013.257881e/debian/changelog python-peachpy-0.0~git20211013.257881e/debian/changelog
--- python-peachpy-0.0~git20211013.257881e/debian/changelog	2022-01-10 07:28:35.000000000 +0200
+++ python-peachpy-0.0~git20211013.257881e/debian/changelog	2022-11-13 11:31:03.000000000 +0200
@@ -1,3 +1,10 @@
+python-peachpy (0.0~git20211013.257881e-1.1) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * Patch: Support setuptools >= 60 (Closes: #1022480)
+
+ -- Stefano Rivera <stefa...@debian.org>  Sun, 13 Nov 2022 11:31:03 +0200
+
 python-peachpy (0.0~git20211013.257881e-1) unstable; urgency=medium
 
   * New upstream version 0.0~git20211013.257881e (Closes: #966250)
diff -Nru python-peachpy-0.0~git20211013.257881e/debian/patches/empty-package-dir.patch python-peachpy-0.0~git20211013.257881e/debian/patches/empty-package-dir.patch
--- python-peachpy-0.0~git20211013.257881e/debian/patches/empty-package-dir.patch	1970-01-01 02:00:00.000000000 +0200
+++ python-peachpy-0.0~git20211013.257881e/debian/patches/empty-package-dir.patch	2022-11-13 11:31:03.000000000 +0200
@@ -0,0 +1,27 @@
+From eaa2eaef5e4f00bc61d0bc9dafbfda13518c7c57 Mon Sep 17 00:00:00 2001
+From: Alfredo Tupone <tup...@gentoo.org>
+Date: Sun, 15 May 2022 20:03:39 +0200
+Subject: [PATCH] Update setup.py
+
+Consider the case where self.distribution.package_dir is an empty dictionary
+Origin: upstream, https://github.com/Maratyszcza/PeachPy/commit/eaa2eaef5e4f00bc61d0bc9dafbfda13518c7c57
+---
+ setup.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/setup.py b/setup.py
+index bd80bd6..337b310 100755
+--- a/setup.py
++++ b/setup.py
+@@ -35,7 +35,7 @@ class GenerateInstructions(Command):
+     def run(self):
+         # package_dir may be None, in that case use the current directory.
+         import os
+-        if self.distribution.package_dir is None:
++        if not self.distribution.package_dir:
+             src_dir = os.getcwd()
+         else:
+             src_dir = os.path.abspath(self.distribution.package_dir[""])
+-- 
+2.35.1
+
diff -Nru python-peachpy-0.0~git20211013.257881e/debian/patches/series python-peachpy-0.0~git20211013.257881e/debian/patches/series
--- python-peachpy-0.0~git20211013.257881e/debian/patches/series	2022-01-10 07:24:58.000000000 +0200
+++ python-peachpy-0.0~git20211013.257881e/debian/patches/series	2022-11-13 11:31:03.000000000 +0200
@@ -1 +1,3 @@
 reproducible-build.patch
+empty-package-dir.patch
+setuptools-60.patch
diff -Nru python-peachpy-0.0~git20211013.257881e/debian/patches/setuptools-60.patch python-peachpy-0.0~git20211013.257881e/debian/patches/setuptools-60.patch
--- python-peachpy-0.0~git20211013.257881e/debian/patches/setuptools-60.patch	1970-01-01 02:00:00.000000000 +0200
+++ python-peachpy-0.0~git20211013.257881e/debian/patches/setuptools-60.patch	2022-11-13 11:31:03.000000000 +0200
@@ -0,0 +1,34 @@
+From a1a3b0b88ea2802d2b0c48c43c73f95897ed914f Mon Sep 17 00:00:00 2001
+From: Stefano Rivera <stefa...@debian.org>
+Date: Sun, 13 Nov 2022 11:28:59 +0200
+Subject: [PATCH] Import setuptools before distutils
+
+setuptools 60 uses its own bundled version of distutils, by default. It
+injects this into sys.modules, at import time. So we need to make sure
+that it is imported, before anything else imports distutils, to ensure
+everything is using the same distutils version.
+
+This change in setuptools is to prepare for Python 3.12, which will drop
+distutils.
+
+Bug-Debian: https://bugs.debian.org/1022480
+Forwarded: https://github.com/Maratyszcza/PeachPy/pull/133
+---
+ setup.py | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/setup.py
++++ b/setup.py
+@@ -1,10 +1,10 @@
+ #!/usr/bin/env python
+ 
++from setuptools import setup
++from setuptools.command.develop import develop
+ import distutils.log
+ from distutils.command.build import build
+-from setuptools.command.develop import develop
+ from distutils.cmd import Command
+-from setuptools import setup
+ 
+ def read_text_file(path):
+     import os

Reply via email to