[Distutils] Incompatibility issue with setuptools 0.6c7-py2.4 and workingenv-0.6.5-py2.4
laurihallila at gmail.com
Mon Oct 8 09:06:05 CEST 2007
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
empty_pat = re.compile(r'^[\t ]*\r?$')
comment_pat = re.compile(r'[\t ]*#')
log.debug("Checking existing site.py in %s", self.install_dir)
f = open(sitepy, 'rb')
current = f.read()
distutils_error = False
lines = current.split("\n")
for line in lines:
if empty_pat.match(line) or comment_pat.match(line):
if not line.startswith('def __boot():'):
distutils_error = True
"%s is not a setuptools-generated site.py; please"
" remove it." % sitepy
On 10/8/07, Lauri Hallila <laurihallila at gmail.com> wrote:
> 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.
> I fixed the problem in my own environment by skipping empty and
> comment-lines in easy_install.py (fixed file attached).
> 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.
> Best regards,
> Lauri Hallila
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Distutils-SIG