Your message dated Wed, 30 Nov 2022 18:10:05 +0000
with message-id <[email protected]>
and subject line Bug#938168: Removed package(s) from unstable
has caused the Debian Bug report #804281,
regarding python-setuptools: get_site_dirs in easy_install.py does not return 
the right path including dist-packages
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.)


-- 
804281: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=804281
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: python-setuptools
Version: 18.4-2
Severity: normal
Tags: patch

Dear Maintainer,

while debugging a case of /usr/lib/python2.7/dist-packages erroneously
being added to easy_install.pth when runnning "setup.py install --user"
for a package of mine, I found a possible bug in a Debian patch
to python-setuptools.

The function get_site_dirs in command/easy_install.py does not return
the system dist-packages path. The reason is that the current patch in
install-layout.diff modifies the wrong section of get_site_dirs. The
current version after applying install-layout.diff reads

[...]
if sys.platform in ('os2emx', 'riscos'):
    sitedirs.append(os.path.join(prefix, "Lib", "site-packages"))
elif os.sep == '/':
    sitedirs.extend([os.path.join(prefix,
                                  "lib",
                                  "python" + sys.version[:3],
                                  "site-packages"),
                     os.path.join(prefix, "lib", "site-python")])
else:
    if sys.version[:3] in ('2.3', '2.4', '2.5'):
        sdir = "site-packages"
    else:
        sdir = "dist-packages"
    sitedirs.extend(
        [os.path.join(prefix, "local/lib", "python" + sys.version[:3], sdir),
                     os.path.join(prefix, "lib", "python" + sys.version[:3], 
sdir)]
                    )
[...]

You can see that the modifications involving dist-packages are in the block for
the case that os.sep != '/', which is presumably never executed on Debian. I
think they should rather be included in the elif block.

I tried to fix the problem and prepared a debdiff of my changes against version
18.4-2. This fixed my original problem mentioned in the first paragraph.


Best,
Philipp


-- System Information:
Debian Release: stretch/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.2.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages python-setuptools depends on:
ii  python-pkg-resources  18.4-2
pn  python:any            <none>

python-setuptools recommends no packages.

Versions of packages python-setuptools suggests:
pn  python-setuptools-doc  <none>

-- no debconf information
diff -Nru python-setuptools-18.4/debian/changelog python-setuptools-18.4/debian/changelog
--- python-setuptools-18.4/debian/changelog	2015-10-24 16:41:14.000000000 +0200
+++ python-setuptools-18.4/debian/changelog	2015-11-06 21:09:35.000000000 +0100
@@ -1,3 +1,9 @@
+python-setuptools (18.4-2.1~tux1) unstable; urgency=medium
+
+  * Correct return value for get_sire_dirs to use dist-packages.
+
+ -- Philipp Edelmann <[email protected]>  Fri, 06 Nov 2015 21:06:34 +0100
+
 python-setuptools (18.4-2) unstable; urgency=medium
 
   * Don't install the SOURCES.txt egg-info file when setup.py is called
diff -Nru python-setuptools-18.4/debian/patches/install-layout.diff python-setuptools-18.4/debian/patches/install-layout.diff
--- python-setuptools-18.4/debian/patches/install-layout.diff	2015-10-24 16:19:26.000000000 +0200
+++ python-setuptools-18.4/debian/patches/install-layout.diff	2015-11-06 21:22:05.000000000 +0100
@@ -1,5 +1,3 @@
-Index: b/setuptools/command/easy_install.py
-===================================================================
 --- a/setuptools/command/easy_install.py
 +++ b/setuptools/command/easy_install.py
 @@ -134,13 +134,15 @@ class easy_install(Command):
@@ -108,25 +106,26 @@
              for attr, val in scheme.items():
                  if getattr(self, attr, None) is None:
                      setattr(self, attr, val)
-@@ -1328,9 +1372,14 @@ def get_site_dirs():
-                                               "site-packages"),
-                                  os.path.join(prefix, "lib", "site-python")])
-             else:
+@@ -1322,11 +1366,14 @@ def get_site_dirs():
+             if sys.platform in ('os2emx', 'riscos'):
+                 sitedirs.append(os.path.join(prefix, "Lib", "site-packages"))
+             elif os.sep == '/':
+-                sitedirs.extend([os.path.join(prefix,
+-                                              "lib",
+-                                              "python" + sys.version[:3],
+-                                              "site-packages"),
+-                                 os.path.join(prefix, "lib", "site-python")])
 +                if sys.version[:3] in ('2.3', '2.4', '2.5'):
 +                    sdir = "site-packages"
 +                else:
 +                    sdir = "dist-packages"
-                 sitedirs.extend(
--                    [prefix, os.path.join(prefix, "lib", "site-packages")]
--                )
++                sitedirs.extend(
 +                    [os.path.join(prefix, "local/lib", "python" + sys.version[:3], sdir),
 +                     os.path.join(prefix, "lib", "python" + sys.version[:3], sdir)]
 +                    )
-             if sys.platform == 'darwin':
-                 # for framework builds *only* we add the standard Apple
-                 # locations. Currently only per-user, but /Library and
-Index: b/setuptools/command/install_egg_info.py
-===================================================================
+             else:
+                 sitedirs.extend(
+                     [prefix, os.path.join(prefix, "lib", "site-packages")]
 --- a/setuptools/command/install_egg_info.py
 +++ b/setuptools/command/install_egg_info.py
 @@ -1,5 +1,5 @@

Attachment: signature.asc
Description: PGP signature


--- End Message ---
--- Begin Message ---
Version: 44.1.1-1.2+rm

Dear submitter,

as the package python-setuptools has just been removed from the Debian archive
unstable we hereby close the associated bug reports.  We are sorry
that we couldn't deal with your issue properly.

For details on the removal, please see https://bugs.debian.org/938168

The version of this package that was in Debian prior to this removal
can still be found using http://snapshot.debian.org/.

Please note that the changes have been done on the master archive and
will not propagate to any mirrors until the next dinstall run at the
earliest.

This message was generated automatically; if you believe that there is
a problem with it please contact the archive administrators by mailing
[email protected].

Debian distribution maintenance software
pp.
Scott Kitterman (the ftpmaster behind the curtain)

--- End Message ---

Reply via email to