|
Scott D Anderson
2012-01-24, 18:27
Andi Vajda
2012-01-24, 20:35
Scott D Anderson
2012-01-24, 21:15
Andi Vajda
2012-01-24, 21:37
Scott D Anderson
2012-01-24, 22:50
Andi Vajda
2012-01-25, 03:33
Scott D Anderson
2012-01-25, 04:40
Andi Vajda
2012-01-27, 23:23
Andi Vajda
2012-01-28, 02:08
|
-
patching of setuptools fails on Fedora 14 (setuptools0.6c11)Scott D Anderson 2012-01-24, 18:27
Hi PyLucene developers,
I'm trying to install PyLucene 3.5.0-3 on some Fedora 14 workstations for one of the researchers in my department. I carefully followed the instructions here http://lucene.apache.org/pylucene/documentation/install.html and I got to the expected bug with setuptools. I then issued exactly the patch command that your software told me to, namely: patch -d /usr/lib/python2.7/site-packages -Nup0 < /usr/network/tmp/pylucene-3.5.0-3 /jcc/jcc/patches/patch.43.0.6c11 patching file setuptools/extension.py Hunk #1 succeeded at 32 (offset 4 lines). patching file setuptools/command/build_ext.py Hunk #1 FAILED at 85. Hunk #2 succeeded at 177 (offset 7 lines). Hunk #3 succeeded at 259 (offset 7 lines). 1 out of 3 hunks FAILED -- saving rejects to file setuptools/command/build_ext.py.rej root@sampras:/tmp As you can see, it failed. I've attached a typescript, in which I show that I haven't modified the standard python-setuptools from the distribution and I show that it's running setuptools-0.6c11. I've also attached the file of rejects listed above. Since you have a pretty sophisticated patch setup, I'm hoping that you'll be able to solve this pretty easily. Please let me know if there's any way I can help. Thanks for your support, Scott -- Scott D. Anderson Computer Science Department Wellesley College [EMAIL PROTECTED] [EMAIL PROTECTED] +
Scott D Anderson 2012-01-24, 18:27
-
Re: patching of setuptools fails on Fedora 14 (setuptools0.6c11)Andi Vajda 2012-01-24, 20:35
Hi Scott, On Tue, 24 Jan 2012, Scott D Anderson wrote: > I'm trying to install PyLucene 3.5.0-3 on some Fedora 14 workstations for > one of the researchers in my department. > I carefully followed the instructions here > http://lucene.apache.org/pylucene/documentation/install.html > and I got to the expected bug with setuptools. > > I then issued exactly the patch command that your software told me to, > namely: > > patch -d /usr/lib/python2.7/site-packages -Nup0 < > /usr/network/tmp/pylucene-3.5.0-3 > /jcc/jcc/patches/patch.43.0.6c11 > patching file setuptools/extension.py > > Hunk #1 succeeded at 32 (offset 4 lines). > patching file setuptools/command/build_ext.py > Hunk #1 FAILED at 85. > Hunk #2 succeeded at 177 (offset 7 lines). > Hunk #3 succeeded at 259 (offset 7 lines). > 1 out of 3 hunks FAILED -- saving rejects to file > setuptools/command/build_ext.py.rej > root@sampras:/tmp > > As you can see, it failed. I've attached a typescript, in which I show > that I haven't modified the I see no typescript attachment ? Andi.. > standard python-setuptools from the distribution and I show that it's > running setuptools-0.6c11. > I've also attached the file of rejects listed above. > > Since you have a pretty sophisticated patch setup, I'm hoping that you'll > be able to solve this pretty > easily. Please let me know if there's any way I can help. > > Thanks for your support, > > Scott > > -- > Scott D. Anderson > Computer Science Department > Wellesley College > [EMAIL PROTECTED] > [EMAIL PROTECTED] > +
Andi Vajda 2012-01-24, 20:35
-
Re: patching of setuptools fails on Fedora 14 (setuptools0.6c11)Scott D Anderson 2012-01-24, 21:15
Hi Andi,
On Tue, Jan 24, 2012 at 3:35 PM, Andi Vajda <[EMAIL PROTECTED]> wrote: > > Hi Scott, > > > On Tue, 24 Jan 2012, Scott D Anderson wrote: > > I'm trying to install PyLucene 3.5.0-3 on some Fedora 14 workstations for >> one of the researchers in my department. >> I carefully followed the instructions here >> http://lucene.apache.org/**pylucene/documentation/**install.html<http://lucene.apache.org/pylucene/documentation/install.html> >> and I got to the expected bug with setuptools. >> >> I then issued exactly the patch command that your software told me to, >> namely: >> >> patch -d /usr/lib/python2.7/site-**packages -Nup0 < >> /usr/network/tmp/pylucene-3.5.**0-3 >> /jcc/jcc/patches/patch.43.0.**6c11 >> patching file setuptools/extension.py >> >> Hunk #1 succeeded at 32 (offset 4 lines). >> patching file setuptools/command/build_ext.**py >> Hunk #1 FAILED at 85. >> Hunk #2 succeeded at 177 (offset 7 lines). >> Hunk #3 succeeded at 259 (offset 7 lines). >> 1 out of 3 hunks FAILED -- saving rejects to file >> setuptools/command/build_ext.**py.rej >> root@sampras:/tmp >> >> As you can see, it failed. I've attached a typescript, in which I show >> that I haven't modified the >> > > I see no typescript attachment ? > Sorry for the confusion. I named it pylucene-install.log, but that's just a rename of the typescript file. Scott > > Andi.. > > > standard python-setuptools from the distribution and I show that it's >> running setuptools-0.6c11. >> I've also attached the file of rejects listed above. >> >> Since you have a pretty sophisticated patch setup, I'm hoping that you'll >> be able to solve this pretty >> easily. Please let me know if there's any way I can help. >> >> Thanks for your support, >> >> Scott >> >> -- >> Scott D. Anderson >> Computer Science Department >> Wellesley College >> [EMAIL PROTECTED] >> [EMAIL PROTECTED] >> >> -- Scott D. Anderson Computer Science Department Wellesley College [EMAIL PROTECTED] [EMAIL PROTECTED] +
Scott D Anderson 2012-01-24, 21:15
-
Re: patching of setuptools fails on Fedora 14 (setuptools0.6c11)Andi Vajda 2012-01-24, 21:37
On Tue, 24 Jan 2012, Scott D Anderson wrote: > Sorry for the confusion. I named it pylucene-install.log, but that's just > a rename > of the typescript file. Your messages have no attachments. Maybe they're being filtered out. Can you include it inline since it's plain text anyway ? Andi.. > > Scott > >> >> Andi.. >> >> >> standard python-setuptools from the distribution and I show that it's >>> running setuptools-0.6c11. >>> I've also attached the file of rejects listed above. >>> >>> Since you have a pretty sophisticated patch setup, I'm hoping that you'll >>> be able to solve this pretty >>> easily. Please let me know if there's any way I can help. >>> >>> Thanks for your support, >>> >>> Scott >>> >>> -- >>> Scott D. Anderson >>> Computer Science Department >>> Wellesley College >>> [EMAIL PROTECTED] >>> [EMAIL PROTECTED] >>> >>> > > > -- > Scott D. Anderson > Computer Science Department > Wellesley College > [EMAIL PROTECTED] > [EMAIL PROTECTED] > +
Andi Vajda 2012-01-24, 21:37
-
Re: patching of setuptools fails on Fedora 14 (setuptools0.6c11)Scott D Anderson 2012-01-24, 22:50
On Tue, Jan 24, 2012 at 4:37 PM, Andi Vajda <[EMAIL PROTECTED]> wrote:
> > On Tue, 24 Jan 2012, Scott D Anderson wrote: > > Sorry for the confusion. I named it pylucene-install.log, but that's just >> a rename >> of the typescript file. >> > > Your messages have no attachments. Maybe they're being filtered out. > Can you include it inline since it's plain text anyway ? > Andi.. Sure. Here's the typescript: Script started on Tue 24 Jan 2012 01:07:10 PM EST [root@sampras tmp] cat /etc/issue Fedora release 14 (Laughlin) Kernel \r on an \m (\l) [root@sampras tmp] rpm -qV python-setuptools [root@sampras tmp] ls -l /usr/lib/python2.7/site-packages/setuptools* -rw-r--r-- 1 root root 144 Oct 26 22:05 /usr/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info -rw-r--r-- 1 root root 34 Oct 26 22:05 /usr/lib/python2.7/site-packages/setuptools.pth /usr/lib/python2.7/site-packages/setuptools: total 300 -rw-r--r-- 1 root root 5927 Oct 26 22:04 archive_util.py -rw-r--r-- 2 root root 5725 Oct 26 22:05 archive_util.pyc -rw-r--r-- 2 root root 5725 Oct 26 22:05 archive_util.pyo drwxr-xr-x 2 root root 4096 Jan 24 11:47 command -rw-r--r-- 1 root root 6209 Oct 26 22:04 depends.py -rw-r--r-- 2 root root 6749 Oct 26 22:05 depends.pyc -rw-r--r-- 2 root root 6749 Oct 26 22:05 depends.pyo -rw-r--r-- 1 root root 30309 Oct 26 22:04 dist.py -rw-r--r-- 1 root root 30221 Oct 26 22:05 dist.pyc -rw-r--r-- 1 root root 30163 Oct 26 22:05 dist.pyo -rw-r--r-- 1 root root 1278 Oct 26 22:04 extension.py -rw-r--r-- 2 root root 1761 Oct 26 22:05 extension.pyc -rw-r--r-- 2 root root 1761 Oct 26 22:05 extension.pyo -rw-r--r-- 1 root root 1278 Oct 26 22:04 extension.py.orig -rw-r--r-- 1 root root 3744 Oct 26 22:04 __init__.py -rw-r--r-- 2 root root 4028 Oct 26 22:05 __init__.pyc -rw-r--r-- 2 root root 4028 Oct 26 22:05 __init__.pyo -rw-r--r-- 1 root root 30447 Oct 26 22:04 package_index.py -rw-r--r-- 2 root root 28625 Oct 26 22:05 package_index.pyc -rw-r--r-- 2 root root 28625 Oct 26 22:05 package_index.pyo -rw-r--r-- 1 root root 8756 Oct 26 22:04 sandbox.py -rw-r--r-- 2 root root 11425 Oct 26 22:05 sandbox.pyc -rw-r--r-- 2 root root 11425 Oct 26 22:05 sandbox.pyo [root@sampras tmp] patch -d /usr/lib/python2.7/site-packages -Nup0 < /usr/network/tmp/pylucene-3.5.0-3 /jcc/jcc/patches/patch.43.0.6c11 patching file setuptools/extension.py Hunk #1 succeeded at 32 (offset 4 lines). patching file setuptools/command/build_ext.py Hunk #1 FAILED at 85. Hunk #2 succeeded at 177 (offset 7 lines). Hunk #3 succeeded at 259 (offset 7 lines). 1 out of 3 hunks FAILED -- saving rejects to file setuptools/command/build_ext.py.rej [root@sampras tmp] exit Script done on Tue 24 Jan 2012 01:08:32 PM EST and here's the contents of build_ex.py.rej --- setuptools/command/build_ext.py (revision 75864) +++ setuptools/command/build_ext.py (working copy) @@ -85,8 +85,12 @@ if fullname in self.ext_map: ext = self.ext_map[fullname] if isinstance(ext,Library): + if ext.force_shared and not use_stubs: + _libtype = 'shared' + else: + _libtype = libtype fn, ext = os.path.splitext(filename) - return self.shlib_compiler.library_filename(fn,libtype) + 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) Thanks for your help. Scott > > > >> Scott >> >> >>> Andi.. >>> >>> >>> standard python-setuptools from the distribution and I show that it's >>> >>>> running setuptools-0.6c11. >>>> I've also attached the file of rejects listed above. >>>> >>>> Since you have a pretty sophisticated patch setup, I'm hoping that >>>> you'll >>>> be able to solve this pretty >>>> easily. Please let me know if there's any way I can help. >>>> >>>> Thanks for your support, >>>> >>> Scott D. Anderson Computer Science Department Wellesley College [EMAIL PROTECTED] [EMAIL PROTECTED] +
Scott D Anderson 2012-01-24, 22:50
-
Re: patching of setuptools fails on Fedora 14 (setuptools0.6c11)Andi Vajda 2012-01-25, 03:33
Hi Scott, I looked at the data you sent. I don't have a Fedora 14 system with python 2.7 where I can reproduce this. I suspect something else modified this file and thus the jcc patch doesn't apply out of the box. I can't guess what you have in that file so I don't know what to tell you off hand. If you send me the original file, I can try to patch it manually. Have you looked at it ? Does it look difficult for you to do ? Andi.. On Tue, 24 Jan 2012, Scott D Anderson wrote: > On Tue, Jan 24, 2012 at 4:37 PM, Andi Vajda <[EMAIL PROTECTED]> wrote: > >> >> On Tue, 24 Jan 2012, Scott D Anderson wrote: >> >> Sorry for the confusion. I named it pylucene-install.log, but that's just >>> a rename >>> of the typescript file. >>> >> >> Your messages have no attachments. Maybe they're being filtered out. >> Can you include it inline since it's plain text anyway ? > > >> Andi.. > > > Sure. Here's the typescript: > > Script started on Tue 24 Jan 2012 01:07:10 PM EST > [root@sampras tmp] cat /etc/issue > Fedora release 14 (Laughlin) > Kernel \r on an \m (\l) > > [root@sampras tmp] rpm -qV python-setuptools > [root@sampras tmp] ls -l /usr/lib/python2.7/site-packages/setuptools* > -rw-r--r-- 1 root root 144 Oct 26 22:05 > /usr/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info > -rw-r--r-- 1 root root 34 Oct 26 22:05 > /usr/lib/python2.7/site-packages/setuptools.pth > > /usr/lib/python2.7/site-packages/setuptools: > total 300 > -rw-r--r-- 1 root root 5927 Oct 26 22:04 archive_util.py > -rw-r--r-- 2 root root 5725 Oct 26 22:05 archive_util.pyc > -rw-r--r-- 2 root root 5725 Oct 26 22:05 archive_util.pyo > drwxr-xr-x 2 root root 4096 Jan 24 11:47 command > -rw-r--r-- 1 root root 6209 Oct 26 22:04 depends.py > -rw-r--r-- 2 root root 6749 Oct 26 22:05 depends.pyc > -rw-r--r-- 2 root root 6749 Oct 26 22:05 depends.pyo > -rw-r--r-- 1 root root 30309 Oct 26 22:04 dist.py > -rw-r--r-- 1 root root 30221 Oct 26 22:05 dist.pyc > -rw-r--r-- 1 root root 30163 Oct 26 22:05 dist.pyo > -rw-r--r-- 1 root root 1278 Oct 26 22:04 extension.py > -rw-r--r-- 2 root root 1761 Oct 26 22:05 extension.pyc > -rw-r--r-- 2 root root 1761 Oct 26 22:05 extension.pyo > -rw-r--r-- 1 root root 1278 Oct 26 22:04 extension.py.orig > -rw-r--r-- 1 root root 3744 Oct 26 22:04 __init__.py > -rw-r--r-- 2 root root 4028 Oct 26 22:05 __init__.pyc > -rw-r--r-- 2 root root 4028 Oct 26 22:05 __init__.pyo > -rw-r--r-- 1 root root 30447 Oct 26 22:04 package_index.py > -rw-r--r-- 2 root root 28625 Oct 26 22:05 package_index.pyc > -rw-r--r-- 2 root root 28625 Oct 26 22:05 package_index.pyo > -rw-r--r-- 1 root root 8756 Oct 26 22:04 sandbox.py > -rw-r--r-- 2 root root 11425 Oct 26 22:05 sandbox.pyc > -rw-r--r-- 2 root root 11425 Oct 26 22:05 sandbox.pyo > [root@sampras tmp] patch -d /usr/lib/python2.7/site-packages -Nup0 < > /usr/network/tmp/pylucene-3.5.0-3 /jcc/jcc/patches/patch.43.0.6c11 > patching file setuptools/extension.py > Hunk #1 succeeded at 32 (offset 4 lines). > patching file setuptools/command/build_ext.py > Hunk #1 FAILED at 85. > Hunk #2 succeeded at 177 (offset 7 lines). > Hunk #3 succeeded at 259 (offset 7 lines). > 1 out of 3 hunks FAILED -- saving rejects to file > setuptools/command/build_ext.py.rej > [root@sampras tmp] exit > > Script done on Tue 24 Jan 2012 01:08:32 PM EST > > and here's the contents of build_ex.py.rej > > --- setuptools/command/build_ext.py (revision 75864) > +++ setuptools/command/build_ext.py (working copy) > @@ -85,8 +85,12 @@ > if fullname in self.ext_map: > ext = self.ext_map[fullname] > if isinstance(ext,Library): > + if ext.force_shared and not use_stubs: > + _libtype = 'shared' > + else: > + _libtype = libtype > fn, ext = os.path.splitext(filename) > - return self.shlib_compiler.library_filename(fn,libtype) > + return self.shlib_compiler.library_filename(fn,_libtype) +
Andi Vajda 2012-01-25, 03:33
-
Re: patching of setuptools fails on Fedora 14 (setuptools0.6c11)Scott D Anderson 2012-01-25, 04:40
On Tue, Jan 24, 2012 at 10:33 PM, Andi Vajda <[EMAIL PROTECTED]> wrote:
> > Hi Scott, > > I looked at the data you sent. > > I don't have a Fedora 14 system with python 2.7 where I can reproduce this. > I suspect something else modified this file and thus the jcc patch doesn't > apply out of the box. > I can understand your suspicion, which is why I did the rpm -V to check whether it's been modified, and it hasn't. I even uninstalled and re-installed it, to be sure (that wasn't in the typescript). I even checked that it's coming from the fedora repo, not some odd other repo. So unless something is very strange, there are a lot of Fedora 14 files out there that the patch doesn't work for. > > I can't guess what you have in that file so I don't know what to tell you > off hand. If you send me the original file, I can try to patch it manually. > I've pasted it below my signature, since something seems to be stripping my attachments. > > Have you looked at it ? Does it look difficult for you to do ? I don't have a lot of experience with setuptools, so I'd be doing a lot of poor guesswork. If you'd be willing to take a crack at it, I'd be very grateful. Thanks, Scott # =============== build_ext.py =======from distutils.command.build_ext import build_ext as _du_build_ext try: # Attempt to use Pyrex for building extensions, if available from Pyrex.Distutils.build_ext import build_ext as _build_ext except ImportError: _build_ext = _du_build_ext import os, sys from distutils.file_util import copy_file from setuptools.extension import Library from distutils.ccompiler import new_compiler from distutils.sysconfig import customize_compiler, get_config_var get_config_var("LDSHARED") # make sure _config_vars is initialized from distutils.sysconfig import _config_vars from distutils import log from distutils.errors import * have_rtld = False use_stubs = False libtype = 'shared' if sys.platform == "darwin": use_stubs = True elif os.name != 'nt': try: from dl import RTLD_NOW have_rtld = True use_stubs = True except ImportError: pass def if_dl(s): if have_rtld: return s return '' class build_ext(_build_ext): def run(self): """Build extensions in build directory, then copy if --inplace""" old_inplace, self.inplace = self.inplace, 0 _build_ext.run(self) self.inplace = old_inplace if old_inplace: self.copy_extensions_to_source() def copy_extensions_to_source(self): build_py = self.get_finalized_command('build_py') for ext in self.extensions: fullname = self.get_ext_fullname(ext.name) filename = self.get_ext_filename(fullname) modpath = fullname.split('.') package = '.'.join(modpath[:-1]) package_dir = build_py.get_package_dir(package) dest_filename os.path.join(package_dir,os.path.basename(filename)) src_filename = os.path.join(self.build_lib,filename) # Always copy, even if source is older than destination, to ensure # that the right extensions for the current Python/platform are # used. copy_file( src_filename, dest_filename, verbose=self.verbose, dry_run=self.dry_run ) if ext._needs_stub: self.write_stub(package_dir or os.curdir, ext, True) if _build_ext is not _du_build_ext and not hasattr(_build_ext,'pyrex_sources'): # Workaround for problems using some Pyrex versions w/SWIG and/or 2.4 def swig_sources(self, sources, *otherargs): # first do any Pyrex processing 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 def initialize_options(self): _build_ext.initialize_options(self) self.shlib_compiler = None self.shlibs = [] self.ext_map = {} def finalize_options(self): _build_ext.finalize_options(self) self.extensions = self.extensions or [] self.check_extensions_list(self.extensions) self.shlibs = [ext for ext in self.extensions 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: ext.runtime_library_dirs.append(os.curdir) def setup_shlib_compiler(self): compiler = self.shlib +
Scott D Anderson 2012-01-25, 04:40
-
Re: patching of setuptools fails on Fedora 14 (setuptools0.6c11)Andi Vajda 2012-01-27, 23:23
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=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: +
Andi Vajda 2012-01-27, 23:23
-
Re: patching of setuptools fails on Fedora 14 (setuptools0.6c11)Andi Vajda 2012-01-28, 02:08
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 <[EMAIL PROTECTED]> 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 = [] +
Andi Vajda 2012-01-28, 02:08
|