[Distutils] Disabling --single-version-externally-managed

Toshio Kuratomi a.badger at gmail.com
Sat Sep 1 22:38:20 CEST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Well, I found a bug.  I haven't coded a solution yet so I don't know
precisely what fixing it will do for the rest of our conversation yet::

    def insert_on(self, path, loc = None):
        """Insert self.location in path before its nearest parent
directory"""
        [...Place loc in path...]
        # p is the spot where we found or inserted loc; now remove
duplicates
        while 1:
            try:
                np = npath.index(nloc, p+1)
            except ValueError:
                break
            else:
                del npath[np], path[np]
                p = np  # ha!

This code creates an unordered list because you might have already had
to place something after one of the duplicate locations that this code
is removing.  We need to do a sort of the entire list after each add +
duplicate removal run.

I'm seeing an actual problem with this when starting with the following
sys.path:
 ['/usr/bin', '/usr/lib/python25.zip', '/usr/lib/python2.5',
'/usr/lib/python2.5/plat-linux2', '/usr/lib/python2.5/lib-tk',
'/usr/lib/python2.5/lib-dynload', '/usr/lib/python2.5/site-packages',
'/usr/lib/python2.5/site-packages/Numeric',
'/usr/lib/python2.5/site-packages/PIL',
'/usr/lib/python2.5/site-packages/TestGears-0.2-py2.5.egg-info',
'/usr/lib/python2.5/site-packages/gst-0.10',
'/usr/lib/python2.5/site-packages/gtk-2.0',
'/usr/lib/python2.5/site-packages/pyinotify',
'/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode']

/usr/lib/python2.5/site-packages/CherryPy-2.2.1-py2.5.egg is being
inserted before '/usr/lib/python2.5/site-packages'.  Then another
/usr/lib/python2.5/site-packages is entering the method and being placed
after /usr/lib/python2.5... which places it before the CherryPy egg.

- -Toshio
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iD8DBQFG2c27X6yAic2E7kgRAraTAJ99J0Ij0OCfxei0bLzC/4l062QEFQCfUKt6
Qe3sguQ07kXv5emazhLFBMA=
=7j/M
-----END PGP SIGNATURE-----


More information about the Distutils-SIG mailing list