Hi Andi,

Thanks, I am attaching a new patch that adds the missing test base.
Sorry for the tabs, I was probably messing around with a few editors
(some of them not configured properly)

The test_Analyzer.py works for me no more - it imports
PythonAttributeImpl which I cannot find in the trunk

I wasn't able to build JCC, there is a build error since the new
commit (tested on Debian with Python2.7 and CentOS with Python 2.6)


gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
-fwrapv -I/usr/kerberos/include -DNDEBUG -O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC
-fwrapv -fPIC -D_java_generics -DJCC_VER="2.13"
-I/usr/lib/jvm/java-openjdk/include
-I/usr/lib/jvm/java-openjdk/include/linux -I_jcc -Ijcc/sources
-I/usr/include/python2.6 -c jcc/sources/functions.cpp -o
build/temp.linux-x86_64-2.6/jcc/sources/functions.o -DPYTHON
-fno-strict-aliasing -Wno-write-strings
jcc/sources/functions.cpp: In function ‘PyObject*
makeInterface(PyObject*, PyObject*)’:
jcc/sources/functions.cpp:153: error: ‘htons’ was not declared in this scope
jcc/sources/functions.cpp: In function ‘PyObject* makeClass(PyObject*,
PyObject*)’:
jcc/sources/functions.cpp:244: error: ‘htons’ was not declared in this scope
error: command 'gcc' failed with exit status 1


So I tried building pylucene with JCC 2.8, after adding to the Makefile

--reserved mutable \
--reserved token \

but got an error:

build/_lucene/__wrap01__.cpp: In function ‘PyObject*
org::apache::pylucene::util::t_PythonListIterator_next(org::apache::pylucene::util::t_PythonListIterator*,
PyObject*)’:
build/_lucene/__wrap01__.cpp:17920:38: error: ‘class
org::apache::pylucene::util::t_PythonListIterator’ has no member named
‘parameters’
build/_lucene/__wrap01__.cpp:17920:77: error: ‘class
org::apache::pylucene::util::t_PythonListIterator’ has no member named
‘parameters’
error: command 'gcc' failed with exit status 1

Then I tried using the pylucene code from Friday (just updated Lucene
java source) and it worked, it seems that changes inside lucene are
not cause of this

roman


On Sat, Jul 7, 2012 at 11:35 AM, Andi Vajda <va...@apache.org> wrote:
>
>  Hi Roman,
>
>
> On Fri, 6 Jul 2012, Roman Chyla wrote:
>
>> I figured this is not complete for jira, retrying /w email...
>
>
> I integrated your patch after merging 3.6.0 -> 3.x and then 3.x into trunk.
> PyLucene's trunk is now setup to track Lucene's branch_4x branch.
>
> I wasn't able to run all tests that succeed for you as you didn't send in
> your new PyLuceneTestCase.py class. Please add it to the test directory
> (instead of a new package) along with the other test helper classes already
> there such as BaseTokenStreamTestCase.py and send it in.
>
> Also, please, please, please, avoid using tab characters in the Java code
> you send in. Tabs are pain to manage, they mess up indentation and make the
> code hard to read.
>
> As this time, PyLucene on trunk builds and runs the few tests you ported
> that don't require this missing file, such as test_Analyzers.py.
>
> Thanks !
>
> Andi..
>
>
>>
>>
>> On Fri, Jul 6, 2012 at 1:55 PM, Andi Vajda <va...@apache.org> wrote:
>>>
>>> I think that the apache mail server is eating up the attachment. Try to
>>> make it a .diff file or attach the patch to a jira issue. Thanks !
>>>
>>> Andi..
>>>
>>> On Jul 6, 2012, at 18:54, Roman Chyla <roman.ch...@gmail.com> wrote:
>>>
>>>> Attaching the patch (there is no chance I could do it in one go, but
>>>> if parts are committed in the trunk, then we can do more...I have also
>>>> introduced base class for unittests, so that may be st to wave)
>>>>
>>>> So far, found one serious problem, crashes VM -- see. eg
>>>> test/test_BinaryDocument.py - when getting the document using:
>>>> reader.document(0)
>>>>
>>>>
>>>> What works fine now:
>>>>
>>>>  test/
>>>>    test_Analyzers
>>>>    test_Binary
>>>>    test_RegexQuery
>>>>
>>>>  samples/LuceneInAction/
>>>>    index.py
>>>>    BasicSearchingTest.py
>>>>
>>>>
>>>>
>>>> On Thu, Jul 5, 2012 at 8:22 PM, Roman Chyla <roman.ch...@gmail.com>
>>>> wrote:
>>>>>
>>>>> The patch probably probably didn't make it to the list, I'll file a
>>>>> ticket later
>>>>>
>>>>> It is definitely lot of work with the python code, I have gone through
>>>>> 1.5 test cases now, and it is just 'unpleasant', so many API changes
>>>>> out there - but I'll try to convert more
>>>>>
>>>>> roman
>>>>>
>>>>> On Thu, Jul 5, 2012 at 7:48 PM, Andi Vajda <va...@apache.org> wrote:
>>>>>>
>>>>>>
>>>>>> On Jul 6, 2012, at 0:27, Roman Chyla <roman.ch...@gmail.com> wrote:
>>>>>>
>>>>>>> Lucene is 4.0 in alpha release and we would like to start working
>>>>>>> with
>>>>>>> pylucene4.0 already. I checked out the pylucene trunk and made the
>>>>>>> necessary changes so that it compiles. Would it be possible to
>>>>>>> incorporate (some of) these changes?
>>>>>>
>>>>>>
>>>>>> Absolutely, please send a patch to the list or file a bug and attach
>>>>>> it there.
>>>>>>
>>>>>> The issue with a PyLucene 4.0 release is not so much getting it to
>>>>>> compile and run but rewriting all the tests and samples (originally 
>>>>>> ported
>>>>>> from Java) since the Lucene api changed in many ways. That's a large 
>>>>>> amount
>>>>>> of work and some of the new analyzer/tokenizer framework stuff needs some
>>>>>> new jcc support for generating classes on the fly. I've got that written 
>>>>>> to
>>>>>> some extent already but porting the samples and tests again is daunting.
>>>>>>
>>>>>> Andi..
>>>>>>
>>>>>>>
>>>>>>> Thanks,
>>>>>>>
>>>>>>> Roman
>>
>>
>

Reply via email to