]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Data pathnames were not converted from URL-style to local style. Fixed.
authorJack Jansen <jack.jansen@cwi.nl>
Sun, 28 Jan 2001 12:22:14 +0000 (12:22 +0000)
committerJack Jansen <jack.jansen@cwi.nl>
Sun, 28 Jan 2001 12:22:14 +0000 (12:22 +0000)
Lib/distutils/command/install_data.py

index dba108af14136b8804e4c7b1b2baf7f0a922a54f..503c1aa8aca024722b0a67e38f2af49ddb83dfa7 100644 (file)
@@ -10,7 +10,7 @@ __revision__ = "$Id$"
 import os
 from types import StringType
 from distutils.core import Command
-from distutils.util import change_root
+from distutils.util import change_root, convert_path
 
 class install_data (Command):
 
@@ -48,6 +48,7 @@ class install_data (Command):
         for f in self.data_files:
             if type(f) == StringType:
                 # it's a simple file, so copy it
+                f = convert_path(f)
                 if self.warn_dir:
                     self.warn("setup script did not provide a directory for "
                               "'%s' -- installing right in '%s'" %
@@ -56,13 +57,14 @@ class install_data (Command):
                 self.outfiles.append(out)
             else:
                 # it's a tuple with path to install to and a list of files
-                dir = f[0]
+                dir = convert_path(f[0])
                 if not os.path.isabs(dir):
                     dir = os.path.join(self.install_dir, dir)
                 elif self.root:
                     dir = change_root(self.root, dir)
                 self.mkpath(dir)
                 for data in f[1]:
+                    data = convert_path(f[1])
                     (out, _) = self.copy_file(data, dir)
                     self.outfiles.append(out)