mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Moved check for installation to non-sys.path location so it comes
last (after writing list of installed files) -- that way, the warning is more visible.
This commit is contained in:
parent
8cb676195b
commit
f9ebf98725
1 changed files with 9 additions and 9 deletions
|
@ -437,14 +437,6 @@ class install (Command):
|
||||||
if self.path_file:
|
if self.path_file:
|
||||||
self.create_path_file ()
|
self.create_path_file ()
|
||||||
|
|
||||||
normalized_path = map (os.path.normpath, sys.path)
|
|
||||||
if (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") %
|
|
||||||
self.install_lib)
|
|
||||||
|
|
||||||
# write list of installed files, if requested.
|
# write list of installed files, if requested.
|
||||||
if self.record:
|
if self.record:
|
||||||
outputs = self.get_outputs()
|
outputs = self.get_outputs()
|
||||||
|
@ -459,7 +451,15 @@ class install (Command):
|
||||||
outputs[counter] = outputs[counter][root_len:]
|
outputs[counter] = outputs[counter][root_len:]
|
||||||
self.execute(write_file,
|
self.execute(write_file,
|
||||||
("INSTALLED_FILES", outputs),
|
("INSTALLED_FILES", outputs),
|
||||||
"Writing list of installed files")
|
"writing list of installed files")
|
||||||
|
|
||||||
|
normalized_path = map (os.path.normpath, sys.path)
|
||||||
|
if (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") %
|
||||||
|
self.install_lib)
|
||||||
|
|
||||||
# run ()
|
# run ()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue