command_consumes_arguments = False # override base
def run(self):
+ self.old_run()
+ if sys.platform == "win32":
+ from setuptools.command.scriptsetup import do_scriptsetup
+ do_scriptsetup()
+
+ def old_run(self):
if self.uninstall:
self.multi_version = True
self.uninstall_link()
self.setup_path = None
self.always_copy_from = '.' # always copy eggs installed in curdir
-
-
-
-
-
def finalize_options(self):
ei = self.get_finalized_command("egg_info")
if ei.broken_egg_info:
log.debug("Checking existing site.py in %s", self.install_dir)
current = open(sitepy,'rb').read()
if not current.startswith('def __boot():'):
- print ("**********************************************************************\n"
- "Warning: %s is not a setuptools-generated site.py\n"
- "It will not be overwritten.\n"
- "**********************************************************************\n"
+ print ("\n"
+ "***********************************************************************\n"
+ "Warning: %s is not a\n"
+ "setuptools-generated site.py. It will not be overwritten.\n"
+ "***********************************************************************\n"
) % (sitepy,)
self.sitepy_installed = True
return
broadcast_settingchange(allusers)
if changed_env:
- print "\n" \
- "Changes have been made to the persistent environment, but not\n" \
- "in this Command Prompt. Running installed Python scripts will\n" \
- "only work from new Command Prompts opened from now on.\n"
+ # whether logout is needed seems to randomly differ between installations
+ # of XP, but it is not needed in Vista or later.
+ try:
+ import platform, re
+ need_logout = not re.search(r'^[6-9]|([1-9][0-9]+)\.', platform.version())
+ except Exception, e:
+ e # hush pyflakes
+ need_logout = True
+
+ if need_logout:
+ print """
+***********************************************************************
+Changes have been made to the persistent environment, but they may not
+take effect in this Windows session. Running installed Python scripts
+from a Command Prompt may only work after you have logged out and back
+in again, or rebooted.
+***********************************************************************
+"""
+ else:
+ print """
+***********************************************************************
+Changes have been made to the persistent environment, but not in this
+Command Prompt. Running installed Python scripts will only work from
+new Command Prompts opened from now on.
+***********************************************************************
+"""
<http://bugs.python.org/setuptools/issue53>
"respect the PYTHONPATH"
+ (Note: this patch does not work as intended when site.py has been modified.
+ This will be fixed in a future version.)
* The following patch to setuptools introduced bugs, and has been reverted
------------------------------------------------------------------------
+ * If unpatched setuptools decides that it needs to change an existing site.py
+ file that appears not to have been written by it (because the file does not
+ start with "def __boot():"), it aborts the installation.
+ zetuptoolz leaves the file alone and outputs a warning, but continues with
+ the installation.
+
+
* The scripts written by zetuptoolz have the following extra line:
# generated by zetuptoolz <version number>