Package: python3-distutils
Version: 3.12.3-1
Severity: important
Tags: patch

Hi Matthias,

python3-distutils installs an empty directory /usr/lib/python3.12. This
is prone to loss when removing another package containing
/lib/python3.12 such as python3-django-pipeline is being removed.

My understanding is that distutils is removed from Python in version
3.12 and thus this empty directory is not required and rather an
oversight. I am attaching a patch that removes the empty directory from
the package.

Helmut
diff --minimal -Nru python3-stdlib-extensions-3.12.3/debian/changelog 
python3-stdlib-extensions-3.12.3/debian/changelog
--- python3-stdlib-extensions-3.12.3/debian/changelog   2024-04-12 
15:08:54.000000000 +0200
+++ python3-stdlib-extensions-3.12.3/debian/changelog   2024-04-29 
08:37:11.000000000 +0200
@@ -1,3 +1,11 @@
+python3-stdlib-extensions (3.12.3-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Drop empty directory /usr/lib/python3.12 from python3-distutils.
+    (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Mon, 29 Apr 2024 08:37:11 +0200
+
 python3-stdlib-extensions (3.12.3-1) unstable; urgency=medium
 
   * Update 3.11 extensions and modules to 3.11.9 release.
diff --minimal -Nru python3-stdlib-extensions-3.12.3/debian/rules 
python3-stdlib-extensions-3.12.3/debian/rules
--- python3-stdlib-extensions-3.12.3/debian/rules       2024-03-03 
14:41:25.000000000 +0100
+++ python3-stdlib-extensions-3.12.3/debian/rules       2024-04-29 
08:37:09.000000000 +0200
@@ -209,9 +209,6 @@
        cp -r 3.12/Lib/tkinter $(d_tk)/usr/lib/python3.12/.
        rm -rf $(d_tk)/usr/lib/python3.12/tkinter/test
 
-       mkdir -p $(d_dist)/usr/lib/python3.12
-       find $(d_dist) -name __pycache__ | xargs -r rm -rf
-
        mkdir -p $(d_2to3)/usr/lib/python3.12
        cp -r 3.12/Lib/lib2to3 $(d_2to3)/usr/lib/python3.12/.
        rm -rf $(d_2to3)/usr/lib/python3.12/lib2to3/tests

Reply via email to