[Distutils] Patch for install.py from Distutils-1.0

Lyle Johnson ljohnson@resgen.com
Fri Oct 13 09:09:01 2000


This is a multi-part message in MIME format.

------=_NextPart_000_0002_01C034ED.3F322BC0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit

On Windows one will often get the warning message "warning: install: modules
installed to 'c:\Python20\', which is not in Python's module search path
(sys.path) -- you'll have to change the search path yourself", even though
the named directory is in fact in the user's PYTHONPATH. The problem is that
the install command is using a case-sensitive comparision of the path names
and Python reports this path entry as "c:\python20" (note the lowercase
"p"). So the comparison fails and the install command emits this false
warning.

The attached patch to the current cvs version of install.py should correct
the problem.

------=_NextPart_000_0002_01C034ED.3F322BC0
Content-Type: application/octet-stream;
	name="install.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="install.diff"

Index: distutils/command/install.py
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /cvsroot/python/distutils/distutils/command/install.py,v
retrieving revision 1.52
diff -c -r1.52 install.py
*** distutils/command/install.py	2000/10/03 03:31:52	1.52
--- distutils/command/install.py	2000/10/13 13:00:45
***************
*** 498,506 ****
                           self.record)
 =20
          normalized_path =3D map(os.path.normpath, sys.path)
          if (self.warn_dir and
              not (self.path_file and self.install_path_file) and
!             os.path.normpath(self.install_lib) not in =
normalized_path):
              self.warn(("modules installed to '%s', which is not in " +
                         "Python's module search path (sys.path) -- " +
                         "you'll have to change the search path =
yourself") %
--- 498,507 ----
                           self.record)
 =20
          normalized_path =3D map(os.path.normpath, sys.path)
+ 	normalized_path =3D map(os.path.normcase, normalized_path)
          if (self.warn_dir and
              not (self.path_file and self.install_path_file) and
!             os.path.normcase(os.path.normpath(self.install_lib)) not =
in normalized_path):
              self.warn(("modules installed to '%s', which is not in " +
                         "Python's module search path (sys.path) -- " +
                         "you'll have to change the search path =
yourself") %

------=_NextPart_000_0002_01C034ED.3F322BC0--