On Thu, 12 Mar 2009, Michael McCandless wrote:
Anyway, finally, a little bruised from the whole process, and
wondering what other Python things on my Mac may now be broken... I
was able to run the tests successfully!
Do not pollute your env with soft links. Use -F instead. Really.
Maybe it's ambitious... but I'd really love a "for the impatient...",
in INSTALL, like this:
pushd jcc
<edit setup.py to configure for your env>
python setup.py build
sudo python setup.py install
popd
<edit Makefile to configure for your env>
make
sudo make install
make test
Normally, this is all that's needed. But you're making the two manual edit
steps smaller in importance than they really are. Still, adding such a
paragraph to the docs can't hurt.
I assume warnings like this are OK on OS X?:
Warning: renaming static method 'toString' on class java.lang.Long to
'toString_' since it is shadowed by non-static method of same name.
This is not specific to OS X but specific to that Java class and Python's
inability to have static and non static methods named the same.
and also these ones?:
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for
C/ObjC but not for C++
That's noise from gcc caused by distutils/setuptools not understanding C++
too well and passing it flags it shouldn't.
Andi..
Mike
Michael McCandless wrote:
OK I was able to finally build (OS X 10.5.6) and run all tests
successfully.
I hit a few OS X issues that I think are my silliness/confused
environment. I'll try to document them here, for future Google
diggers, but note that I sort of desperately rushed though things
trying to get it to work so I'm not 100% certain about all the details
below...
It turns out, I have python frameworks installed under
/System/Library/Frameworks/... as well as /Library/Frameworks/... I'm
not sure if this is normal or what I did to cause it, but that caused
problems because the jcc build was going against one of them and the
pylucene build, against the other one. Python 2.5 was installed at
both places...
At first I hit this error:
ld: -rpath can only be used when targeting Mac OS X 10.5 or later
when building pylucene, apparently, because one of my frameworks
targeted OS X 10.3. Somehow I got past that and then...
When building pylucene, I hit this:
Fatal Python error: Interpreter not initialized (version
mismatch?)
when "python -m jcc" tried to run, which was also caused by the two
frameworks. So I edited pylucene's Makefile to force it to use the
same python framework (hardwired the full path to the python exe), and
then all worked.
(I've also symlink'd my two different 2.5 Python frameworks
together... let's see if anything breaks).
At one point I also hit this:
_NSJVMLoadLibrary: NSAddLibrary failed for
c/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Libraries/libjvm.dylib
from JCC when it tries to init the JVM, previously discussed here:
http://mail-archives.apache.org/mod_mbox/lucene-pylucene-dev/200902.mbox/%3c35483342-7332-4aa4-8c5a-60693d656...@mikemccandless.com%3e
Downgrading to JDK 1.5 fixed, this for some reason.
Mike
Andi Vajda wrote:
On Wed, 11 Mar 2009, Aric Coady wrote:
On Mar 11, 2009, at 10:06 AM, Andi Vajda wrote:
With the recent release of Java Lucene 2.4.1, it's high time PyLucene
get its first release out as an Apache subproject. I hope I got all the
steps right and all the things into the right place.
Thanks.
Release candidate 1 of PyLucene 2.4.1 is available from:
http://people.apache.org/~vajda/staging_area/
Make install is failing with python 2.6 because of a conflict between the
new collections module and the builtin one.
Ugh. I moved the collections.py file to a python sub-directory.
This is only a problem during the build. The collections.py file is
installed into the lucene egg where it is accessible from under the lucene
package then.
I also backed out the earlier config.py build trick as it fails when
install is used without build first.
I uploaded a new release candidate, rc3, to the staging area:
http://people.apache.org/~vajda/staging_area/
Thank you for the bug report.
Andi..
...
File
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/command/easy_install.py",
line 21, in <module>
File
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/setuptools-0.6c9-py2.6.egg/setuptools/package_index.py",
line 2, in <module>
File
"/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/urlparse.py",
line 84, in <module>
from collections import namedtuple
ImportError: cannot import name namedtuple
make: *** [install] Error 255
Probably will be necessary to rename or move collections.py.
-Coady