update bundled zetuptools with doc changes, change to script setup for Windows XP, and to have the 'develop' command run script setup.

This commit is contained in:
david-sarah 2010-08-02 17:38:15 -07:00
parent 58cce54ada
commit e16c794f19
4 changed files with 46 additions and 13 deletions

View File

@ -20,6 +20,12 @@ class develop(easy_install):
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()
@ -34,11 +40,6 @@ class develop(easy_install):
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:

View File

@ -1087,10 +1087,11 @@ these changes you will not be able to run the installed code.
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

View File

@ -256,7 +256,29 @@ def do_scriptsetup(allusers=False):
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.
***********************************************************************
"""

View File

@ -13,6 +13,8 @@ differences:
<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
@ -33,6 +35,13 @@ differences:
------------------------------------------------------------------------
* 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>