[Distutils] Path conversion for package_dir missing

Thomas Heller thomas.heller@ion-tof.com
Mon Jan 28 04:46:20 2002


From: "Jack Jansen" <Jack.Jansen@oratrix.nl>
> Folks,
> I just submitted a bug report (509288) that the path conversion 
> that needs to be done for all pathnames, converting from URLs 
> (or unix pathnames, depending on your point of view) to local 
> convention is missing for package_dir.

Does this patch fix the problem?

Thomas

Index: build_py.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/distutils/command/build_py.py,v
retrieving revision 1.34
diff -c -r1.34 build_py.py
*** build_py.py 2001/12/06 20:59:17 1.34
--- build_py.py 2002/01/28 09:38:55
***************
*** 12,17 ****
--- 12,18 ----
  
  from distutils.core import Command
  from distutils.errors import *
+ from distutils.util import convert_path
  
  
  class build_py (Command):
***************
*** 50,56 ****
          # options -- list of packages and list of modules.
          self.packages = self.distribution.packages
          self.py_modules = self.distribution.py_modules
!         self.package_dir = self.distribution.package_dir
  
          # Ick, copied straight from install_lib.py (fancy_getopt needs a
          # type system!  Hell, *everything* needs a type system!!!)
--- 51,59 ----
          # options -- list of packages and list of modules.
          self.packages = self.distribution.packages
          self.py_modules = self.distribution.py_modules
!         self.package_dir = {}
!         for name, path in self.distribution.package_dir.items():
!             self.package_dir[name] = convert_path(path)
  
          # Ick, copied straight from install_lib.py (fancy_getopt needs a
          # type system!  Hell, *everything* needs a type system!!!)