diff options
Diffstat (limited to 'debian/patches/distutils-install-layout.diff')
-rw-r--r-- | debian/patches/distutils-install-layout.diff | 34 |
1 files changed, 9 insertions, 25 deletions
diff --git a/debian/patches/distutils-install-layout.diff b/debian/patches/distutils-install-layout.diff index 9ca8b00..fbc6681 100644 --- a/debian/patches/distutils-install-layout.diff +++ b/debian/patches/distutils-install-layout.diff @@ -2,8 +2,6 @@ # DP: - installs into $prefix/dist-packages instead of $prefix/site-packages. # DP: - doesn't encode the python version into the egg name. -Index: b/Lib/distutils/command/install_egg_info.py -=================================================================== --- a/Lib/distutils/command/install_egg_info.py +++ b/Lib/distutils/command/install_egg_info.py @@ -14,18 +14,38 @@ class install_egg_info(Command): @@ -50,8 +48,6 @@ Index: b/Lib/distutils/command/install_egg_info.py self.target = os.path.join(self.install_dir, basename) self.outputs = [self.target] -Index: b/Lib/distutils/command/install.py -=================================================================== --- a/Lib/distutils/command/install.py +++ b/Lib/distutils/command/install.py @@ -35,6 +35,20 @@ INSTALL_SCHEMES = { @@ -139,11 +135,9 @@ Index: b/Lib/distutils/command/install.py def finalize_other(self): """Finalizes options for non-posix platforms""" -Index: b/Lib/distutils/sysconfig.py -=================================================================== --- a/Lib/distutils/sysconfig.py +++ b/Lib/distutils/sysconfig.py -@@ -122,6 +122,7 @@ def get_python_lib(plat_specific=0, stan +@@ -140,6 +140,7 @@ def get_python_lib(plat_specific=0, stan If 'prefix' is supplied, use it instead of sys.base_prefix or sys.base_exec_prefix -- i.e., ignore 'plat_specific'. """ @@ -151,7 +145,7 @@ Index: b/Lib/distutils/sysconfig.py if prefix is None: if standard_lib: prefix = plat_specific and BASE_EXEC_PREFIX or BASE_PREFIX -@@ -133,6 +134,12 @@ def get_python_lib(plat_specific=0, stan +@@ -151,6 +152,12 @@ def get_python_lib(plat_specific=0, stan "lib", "python" + get_python_version()) if standard_lib: return libpython @@ -164,8 +158,6 @@ Index: b/Lib/distutils/sysconfig.py else: return os.path.join(libpython, "site-packages") elif os.name == "nt": -Index: b/Lib/site.py -=================================================================== --- a/Lib/site.py +++ b/Lib/site.py @@ -7,12 +7,18 @@ @@ -188,7 +180,7 @@ Index: b/Lib/site.py If a file named "pyvenv.cfg" exists one directory above sys.executable, sys.prefix and sys.exec_prefix are set to that directory and it is also checked for site-packages (sys.base_prefix and -@@ -304,9 +310,20 @@ def getsitepackages(prefixes=None): +@@ -334,9 +340,20 @@ def getsitepackages(prefixes=None): seen.add(prefix) if os.sep == '/': @@ -211,14 +203,12 @@ Index: b/Lib/site.py else: sitepackages.append(prefix) sitepackages.append(os.path.join(prefix, "lib", "site-packages")) -Index: b/Lib/test/test_site.py -=================================================================== --- a/Lib/test/test_site.py +++ b/Lib/test/test_site.py -@@ -260,10 +260,10 @@ class HelperFunctionsTests(unittest.Test - self.assertEqual(dirs[1], wanted) - elif os.sep == '/': - # OS X non-framwework builds, Linux, FreeBSD, etc +@@ -269,10 +269,10 @@ class HelperFunctionsTests(unittest.Test + dirs = site.getsitepackages() + if os.sep == '/': + # OS X, Linux, FreeBSD, etc - self.assertEqual(len(dirs), 1) - wanted = os.path.join('xoxo', 'lib', + self.assertEqual(len(dirs), 3) @@ -229,21 +219,17 @@ Index: b/Lib/test/test_site.py self.assertEqual(dirs[0], wanted) else: # other platforms -Index: b/Lib/distutils/tests/test_bdist_dumb.py -=================================================================== --- a/Lib/distutils/tests/test_bdist_dumb.py +++ b/Lib/distutils/tests/test_bdist_dumb.py @@ -85,7 +85,7 @@ class BuildDumbTestCase(support.TempdirM fp.close() - contents = sorted(os.path.basename(fn) for fn in contents) + contents = sorted(filter(None, map(os.path.basename, contents))) - wanted = ['foo-0.1-py%s.%s.egg-info' % sys.version_info[:2], 'foo.py'] + wanted = ['foo-0.1.egg-info', 'foo.py'] if not sys.dont_write_bytecode: wanted.append('foo.%s.pyc' % sys.implementation.cache_tag) self.assertEqual(contents, sorted(wanted)) -Index: b/Lib/distutils/tests/test_install.py -=================================================================== --- a/Lib/distutils/tests/test_install.py +++ b/Lib/distutils/tests/test_install.py @@ -193,7 +193,7 @@ class InstallTestCase(support.TempdirMan @@ -264,11 +250,9 @@ Index: b/Lib/distutils/tests/test_install.py self.assertEqual(found, expected) def test_debug_mode(self): -Index: b/Lib/pydoc.py -=================================================================== --- a/Lib/pydoc.py +++ b/Lib/pydoc.py -@@ -417,6 +417,7 @@ class Doc: +@@ -420,6 +420,7 @@ class Doc: 'marshal', 'posix', 'signal', 'sys', '_thread', 'zipimport') or (file.startswith(basedir) and |