lucene-pylucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andi Vajda <va...@apache.org>
Subject Re: patching of setuptools fails on Fedora 14 (setuptools0.6c11)
Date Sat, 28 Jan 2012 02:08:51 GMT


On Fri, 27 Jan 2012, Scott D Anderson wrote:

> Well, my code would be coming from the RPMs in the Fedora 14 repository.
> Maybe tweaked by someone in the Fedora community?
>
> Hmm.  Here's a thought.  Would it make sense to use pip to re-install
> setuptools?  Presumably pip would look at the pypi.python.org place that
> you referenced, rather than the Fedora repository, and if it replaced the
> Fedora stuff, your original code might just work.  I don't know a lot about
> pip and setuptools, so I may be missing something.

To reinstall setuptools, just get and run the setuptools egg as outlined 
here:
   http://pypi.python.org/pypi/setuptools/0.6c11#cygwin-mac-os-x-linux-other

Andi..

>
> Thanks,
>
> Scott
>
> On Fri, Jan 27, 2012 at 6:23 PM, Andi Vajda <vajda@apache.org> wrote:
>
>>
>>  Hi Scott,
>>
>>
>> On Thu, 26 Jan 2012, Scott D Anderson wrote:
>>
>>  Ah, my apologies. I didn't realize that the patch had half-succeeded.   I
>>> have reinstalled the python-setuptools package from the Fedora repo and
>>> I've verified that the package is unmodified.  I've attached the
>>> build_ext.py.orig file, which is identical to the build_ext.py file.
>>>
>>> Sorry for the double-attachment last time.  I was trying to get it to
>>> attach as plain text instead of octet stream, and then I couldn't delete
>>> the extra attachment.
>>>
>>
>> This is what I was afraid of. The original setuptools sources on PyPI,
>> http://pypi.python.org/**packages/source/s/setuptools/**
>> setuptools-0.6c11.tar.gz#md5=**7df2a529a074f613b509fb44feefe7**4e<http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz#md5=7df2a529a074f613b509fb44feefe74e>
>> (which list the author, pje, as the file owner even), has a different
>> version of build_ext.py from what you sent me.
>>
>> The diff is attached and included below.
>>
>> Unless you can explain where your modified version is coming from and why,
>> I really don't see what I can do to 'properly' fix this.
>>
>> The comment about distutils 3.1 in your version that doesn't exist in the
>> original seems to indicate that your version is newer than what it's
>> purported to be, 0.6c11.
>>
>> If there is a newer version of setuptools out there that needs a new
>> patch, I can certainly write it but what is it and where is it coming from ?
>>
>> Andi..
>>
>> --- /Users/vajda/build_ext.py.orig      2012-01-27 15:13:36.000000000
>> -0800
>> +++ /Users/vajda/tmp/s.b/**setuptools-0.6c11/setuptools/**command/build_ext.py
>>      2009-10-19 10:35:44.000000000 -0700
>> @@ -77,27 +77,25 @@
>>
>>             sources = _build_ext.swig_sources(self, sources) or sources
>>             # Then do any actual SWIG stuff on the remainder
>>             return _du_build_ext.swig_sources(**self, sources, *otherargs)
>>
>>
>>
>>     def get_ext_filename(self, fullname):
>>         filename = _build_ext.get_ext_filename(**self,fullname)
>> -        if fullname not in self.ext_map:
>> -            return filename
>> -        ext = self.ext_map[fullname]
>> -        if isinstance(ext,Library):
>> -            fn, ext = os.path.splitext(filename)
>> -            return self.shlib_compiler.library_**filename(fn,libtype)
>> -        elif use_stubs and ext._links_to_dynamic:
>> -            d,fn = os.path.split(filename)
>> -            return os.path.join(d,'dl-'+fn)
>> -        else:
>> -            return filename
>> +        if fullname in self.ext_map:
>> +            ext = self.ext_map[fullname]
>> +            if isinstance(ext,Library):
>> +                fn, ext = os.path.splitext(filename)
>> +                return self.shlib_compiler.library_**filename(fn,libtype)
>> +            elif use_stubs and ext._links_to_dynamic:
>> +                d,fn = os.path.split(filename)
>> +                return os.path.join(d,'dl-'+fn)
>> +        return filename
>>
>>
>>     def initialize_options(self):
>>         _build_ext.initialize_options(**self)
>>         self.shlib_compiler = None
>>         self.shlibs = []
>>         self.ext_map = {}
>>
>>     def finalize_options(self):
>> @@ -108,21 +106,16 @@
>>
>>                         if isinstance(ext,Library)]
>>         if self.shlibs:
>>             self.setup_shlib_compiler()
>>         for ext in self.extensions:
>>             ext._full_name = self.get_ext_fullname(ext.name**)
>>         for ext in self.extensions:
>>             fullname = ext._full_name
>>             self.ext_map[fullname] = ext
>> -
>> -            # distutils 3.1 will also ask for module names
>> -            # XXX what to do with conflicts?
>> -            self.ext_map[fullname.split('.**')[-1]] = ext
>>
>> -
>>             ltd = ext._links_to_dynamic = \
>>                 self.shlibs and self.links_to_dynamic(ext) or False
>>             ext._needs_stub = ltd and use_stubs and not
>> isinstance(ext,Library)
>>             filename = ext._file_name = self.get_ext_filename(**fullname)
>>             libdir = os.path.dirname(os.path.join(**
>> self.build_lib,filename))
>>             if ltd and libdir not in ext.library_dirs:
>>                 ext.library_dirs.append(**libdir)
>>             if ltd and use_stubs and os.curdir not in
>> ext.runtime_library_dirs:
>>
>
>
>
> -- 
> Scott D. Anderson
> Computer Science Department
> Wellesley College
> Scott.Anderson@acm.org
> Scott.Anderson@wellesley.edu
>

Mime
View raw message