It seems that the message was blocked by moderator because of my e-mail being too big... I'll just copy-paste how I fixed the problem in easy_install.py here:<br><br>empty_pat = re.compile(r'^[\t ]*\r?$')<br>comment_pat =
re.compile(r'[\t ]*#')<br><br>...<br><br> if os.path.exists(sitepy):<br> log.debug("Checking existing site.py in %s", self.install_dir)<br> f = open(sitepy, 'rb')<br>
current = f.read()<br> f.close()<br> distutils_error = False<br> lines = current.split("\n")<br><br> for line in lines:<br> if empty_pat.match(line) or comment_pat.match(line):
<br> continue<br> else:<br> if not line.startswith('def __boot():'):<br> distutils_error = True<br> break<br><br> if distutils_error:
<br> raise DistutilsError(<br> "%s is not a setuptools-generated site.py; please"<br> " remove it." % sitepy<br> )<br><br><div><span class="gmail_quote">
On 10/8/07, <b class="gmail_sendername">Lauri Hallila</b> <<a href="mailto:laurihallila@gmail.com">laurihallila@gmail.com</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hello!<br><br>I noticed a small problem in setuptools... workingenv (version 0.6.5-py2.4), in some instances, adds a comment-line "# Duplicating setuptools' site.py..." into the beginning of site.py (workingenv.py
, line 1214). Problem is that easy_install.py checks if the existing file site.py starts with "def __boot():", and if it doesn't, it raises an error.<br><br>I fixed the problem in my own environment by skipping empty and comment-lines in easy_install.py (fixed file attached).
<br><br>I just thought to inform you of the problem... feel free to take my fix into setuptools if you like my way to fix the problem.<br><br><br>Best regards,<br><span class="sg">Lauri Hallila<br><br>
</span><br clear="all"></blockquote></div><br>