Re: Issue installing pylucene

2017-07-27 Thread Andi Vajda

> On Jul 21, 2017, at 00:58, safia kanwal  wrote:
> 
> Hello Developer, I was trying to install pylucene on my mac with mac OS 
> Sierra(10.12.4). I have java version “1.8.0_25”. I am attaching the setup 
> file which I edited a bit. Now I am having this issue “OSError: b'javac: 
> target release 1.5 conflicts with default source release 1.8\n’” and I cannot 
> backtrack my system to java 1.5. Where to go now. Please help in this regard. 
> Thanks a lot

What version of PyLucene are you trying to install ?

Andi..

> 
> 
> Best Regards
> Safia Kanwal
> 


Issue installing pylucene

2017-07-21 Thread safia kanwal
Hello Developer, I was trying to install pylucene on my mac with mac OS Sierra(10.12.4). I have java version “1.8.0_25”. I am attaching the setup file which I edited a bit. Now I am having this issue “OSError: b'javac: target release 1.5 conflicts with default source release 1.8\n’” and I cannot backtrack my system to java 1.5. Where to go now. Please help in this regard. Thanks a lotBest RegardsSafia Kanwal#   Licensed under the Apache License, Version 2.0 (the "License");
#   you may not use this file except in compliance with the License.
#   You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
#   Unless required by applicable law or agreed to in writing, software
#   distributed under the License is distributed on an "AS IS" BASIS,
#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#   See the License for the specific language governing permissions and
#   limitations under the License.

import os, sys, platform, subprocess

jcc_ver = '2.15'
machine = platform.machine()

if machine.startswith("iPod") or machine.startswith("iPhone"):
platform = 'ipod'
elif sys.platform == "win32" and "--compiler=mingw32" in sys.argv:
platform = 'mingw32'
else:
platform = sys.platform

# Add or edit the entry corresponding to your system in the JDK, INCLUDES,
# CFLAGS, DEBUG_CFLAGS, LFLAGS and JAVAC dictionaries below. 
# These entries are used to build JCC _and_ by JCC to drive compiling and
# linking via distutils or setuptools the extensions it generated code for.
#
# The key for your system is determined by the platform variable defined
# above.
#
# Instead of editing the entries below, you may also override these
# dictionaries with JCC_JDK, JCC_INCLUDES, JCC_CFLAGS, JCC_DEBUG_CFLAGS,
# JCC_LFLAGS and JCC_JAVAC environment variables using os.pathsep as value
# separator.

if platform in ("win32", "mingw32"):
try:
from helpers.windows import JAVAHOME
except ImportError:
JAVAHOME = None
elif platform in ("darwin",):
try:
from helpers.darwin import JAVAHOME
except ImportError:
JAVAHOME = None
else:
JAVAHOME = None

JDK = {
'darwin': JAVAHOME,
'ipod': '/usr/include/gcc',
'linux2': '/usr/lib/jvm/java-7-openjdk-amd64',
'sunos5': '/usr/jdk/instances/jdk1.6.0',
'win32': JAVAHOME,
'mingw32': JAVAHOME,
'freebsd7': '/usr/local/diablo-jdk1.6.0'
}
if 'JCC_JDK' in os.environ:
JDK[platform] = os.environ['JCC_JDK']


if not JDK[platform]:
raise RuntimeError('''
   
Can't determine where the Java JDK has been installed on this machine.

Please set the environment variable JCC_JDK to that location before
running setup.py.
''')

elif not os.path.isdir(JDK[platform]):
raise RuntimeError('''
   
Java JDK directory '%s' does not exist.

Please set the environment variable JCC_JDK to the correct location before
running setup.py.
''' %(JDK[platform]))


INCLUDES = {
'darwin': ['%(darwin)s/Headers' %(JDK)],
'ipod': ['%(ipod)s/darwin/default' %(JDK)],
'linux2': ['%(linux2)s/include' %(JDK),
   '%(linux2)s/include/linux' %(JDK)],
'sunos5': ['%(sunos5)s/include' %(JDK),
   '%(sunos5)s/include/solaris' %(JDK)],
'win32': ['%(win32)s/include' %(JDK),
  '%(win32)s/include/win32' %(JDK)],
'mingw32': ['%(mingw32)s/include' %(JDK),
'%(mingw32)s/include/win32' %(JDK)],
'freebsd7': ['%(freebsd7)s/include' %(JDK),
 '%(freebsd7)s/include/freebsd' %(JDK)],
}

CFLAGS = {
'darwin': ['-fno-strict-aliasing', '-Wno-write-strings'],
'ipod': ['-Wno-write-strings'],
'linux2': ['-fno-strict-aliasing', '-Wno-write-strings'],
'sunos5': ['-features=iddollar',
   '-erroff=badargtypel2w,wbadinitl,wvarhidemem'],
'win32': ["/EHsc", "/D_CRT_SECURE_NO_WARNINGS"],  # MSVC 9 (2008)
'mingw32': ['-fno-strict-aliasing', '-Wno-write-strings'],
'freebsd7': ['-fno-strict-aliasing', '-Wno-write-strings'],
}

# added to CFLAGS when JCC is invoked with --debug
DEBUG_CFLAGS = {
'darwin': ['-O0', '-g', '-DDEBUG'],
'ipod': ['-O0', '-g', '-DDEBUG'],
'linux2': ['-O0', '-g', '-DDEBUG'],
'sunos5': ['-DDEBUG'],
'win32': ['/Od', '/DDEBUG'],
'mingw32': ['-O0', '-g', '-DDEBUG'],
'freebsd7': ['-O0', '-g', '-DDEBUG'],
}

LFLAGS = {
'darwin': ['-framework', 'JavaVM'],
'ipod': ['-ljvm', '-lpython%s.%s' %(sys.version_info[0:2]),
 '-L/usr/lib/gcc/arm-apple-darwin9/4.0.1'],
'linux2/i386': ['-L%(linux2)s/jre/lib/i386' %(JDK), '-ljava',
'-L%(linux2)s/jre/lib/i386/client' %(JDK), '-ljvm',
'-Wl,-rpath=%(linux2)s/jre/lib/i386:%(linux2)s/jre/lib/i386/client' %(JDK)],
'linux2/i686': ['-L%(linux2)s/jre/lib/i386' %(JDK), '-ljava',
'-L%(linux2)s/jre/lib/i386/client' %(JDK), '-ljvm',

Re: Installing PyLucene

2017-01-26 Thread Andi Vajda


On Fri, 6 Jan 2017, Andi Vajda wrote:


On Fri, 6 Jan 2017, Jan HC8ydahl wrote:


Hi,

I hope you didn?t get this wrong! We all appreciate the existence of 
JCC/PyLucene and especially all the effort you?ve put into this.



PyLucene is driven by its own community, and user involvement and 
contributions is a must.
The (sub)project will survive only to the extent that its current users 
invest in it.



So if some funding is required to get this going ?


For an ASF Open Source Project, the only thing that is required to get 
going is user/developer
involvement and teamwork. While Andi started the project due to needs at 
the time, and became
a committer, he is no longer an active user, so perhaps time has come for 
other users to step ut and take

responsibility.

How ?funding? would look like in the Python3 case is not so much sending 
money to the ASF,
but more for individual companies like your own, to sponsor (through 
developer time) the major
work on the patch, and driving it through to completion. Hopefully other 
users will contribute along

the way too.

You will of course need help from experienced developers, but the ideal 
situation is that after
a couple of such patches that get committed, you (or the developer working 
on the code) will be nominated
as committer and can continue developing PyLucene without the need for Andi 
or any other one individual.


There has been some discussions about the future of PyLucene on this list 
but I still didn't see any conclusion/decision



The discussion sparked some new development and a release, which is a 
success. So the decission I guess is to keep PyLucene alive and try to 
strengthen the community.
As long as the project continues to produce releases, it is (somewhat) 
alive.
If on the other hand another year or two goes by without another release, 
I?m sure the PMC will take action again.


I intend to produce a PyLucene 6.4 release once Lucene 6.4 is done.
It's been a few months now...


Lucene 6.4.0 was released on Monday. I did a quick test build of PyLucene 
with that code and it required no changes at all. Given that a Lucene 6.4.1 
bugfix release is around the corner, I'll wait until it is released to send 
a PyLucene 6.4.1 release candidate for vote.


Andi..



Andi..



--
Jan HC8ydahl, search solution architect
Cominvent AS - www.cominvent.com


6. jan. 2017 kl. 10.34 skrev Thomas Koch :

Dear Andi,

I?ve just sent the link to the public gist with the patch to Petrus and 
this list. As mentioned by Oliver we?d be more than happy if a core 
developer of JCC/PyLucene could review the patch and decide what to do 
with it. It has been developed without intimate knowledge of JCC with the 
goal to make PyLucene(36) usable with Python3. It may have some issues or 
need improvements (also cf. "IMPORTANT NOTES" in my last email about 
current limitations of the patch). That?s where export review (and effort) 
is needed.


For the future of course a port to newer versions of JCC/PyLucene would be 
more than valuable. I think what Oliver wanted to express is that we don?t 
have that much deep know how of JCC and can thus can only provide initial 
efforts and contributions, but for production/release ready code an export 
review is still needed. Also we haven?t watched the development of newer 
versions of PyLucene as we?re still stuck with PyLucene36.


I hope you didn?t get this wrong! We all appreciate the existence of 
JCC/PyLucene and especially all the effort you?ve put into this.


However, I fear that Python 3 support is a must-have for a Python tool or 
library that's available today:

- Python3 is here to stay! (py3.6 has just been released)
- Most of the popular Python packages do meanwhile provide Python3 support 
- cf. http://py3readiness.org 
- Python2 support will end by 2020 (sounds far away but isn't - cf. 
https://pythonclock.org  )


There has been some discussions about the future of PyLucene on this list 
but I still didn't see any conclusion/decision. Without a transparent 
roadmap and ongoing development (i.e. new releases, Python3 support etc.) 
the usage of JCC/PyLucene is most likely unattractive for developers who 
start a new project and this is where the user base shrinks and further 
contributions are stalled (somehow a chicken-egg-problem).


I'm not sure how far the ASF may help here, but I've read that the Python 
Software Foundation occasionally funds projects to port libraries that are 
widely used but don't have enough of a community to do a port.
cf. 
https://developers.slashdot.org/story/13/08/25/2115204/interviews-guido-van-rossum-answers-your-questions 



So if some funding is required to get this going ...



best regards,

Thomas
?

Am 04.01.2017 um 19:41 schrieb Andi Vajda :



Note that PyLucene currently 

Re: Installing PyLucene

2017-01-12 Thread Andi Vajda

> On Jan 12, 2017, at 02:22, Thomas Koch  wrote:
> 
> Dear Jan, 
> thanks for your explanations.
> 
>> PyLucene is driven by its own community, and user involvement and 
>> contributions is a must.
> I’m quite familiar with community contributions - have already submitted code 
> and feedback, tested Pylucene releases, did provide support to other users 
> and voted several times for new releases.
> 
> 
>> The (sub)project will survive only to the extent that its current users 
>> invest in it.
> so is this different to how the main (Java)Lucene project works? just curious 
> …
> 
> 
>> For an ASF Open Source Project, the only thing that is required to get going 
>> is user/developer
>> involvement and teamwork. While Andi started the project due to needs at the 
>> time, and became
>> a committer, he is no longer an active user, so perhaps time has come for 
>> other users to step ut and take
>> responsibility.
>> 
> That’s first time I hear this (bad) news. So if Andi is no longer an active 
> user - who is the maintainer of PyLucene/JCC?

I am still the maintainer of this project. I am no longer using Lucene or 
PyLucene on a daily basis since 2011. I'm still happy to continue maintaining 
the project, though.

Andi..

> 
>> How “funding” would look like in the Python3 case is not so much sending 
>> money to the ASF,
>> but more for individual companies like your own, to sponsor (through 
>> developer time) the major
>> work on the patch, and driving it through to completion. Hopefully other 
>> users will contribute along
>> the way too.
> 
> 
> We developed and provided the patch (which already took some time) for review 
> and further adaption and really hope now for other users to step in. This is 
> our current position for several reasons an after internal discussions which 
> I cannot disclose here. Sorry. On the other hand, if we’d be the only user(s) 
> interested/willing to push Python3 support (and Pylucene/JCC as a whole) then 
> this project could not survive anyway I fear.
> 
> 
> best regards,
> 
> Thomas 
> —
>> Am 06.01.2017 um 12:32 schrieb Jan Høydahl :
>> 
>> Hi,
>> 
>>> I hope you didn’t get this wrong! We all appreciate the existence of 
>>> JCC/PyLucene and especially all the effort you’ve put into this.  
>> 
>> 
>> PyLucene is driven by its own community, and user involvement and 
>> contributions is a must.
>> The (sub)project will survive only to the extent that its current users 
>> invest in it.
>> 
>>> So if some funding is required to get this going …
>> 
>> For an ASF Open Source Project, the only thing that is required to get going 
>> is user/developer
>> involvement and teamwork. While Andi started the project due to needs at the 
>> time, and became
>> a committer, he is no longer an active user, so perhaps time has come for 
>> other users to step ut and take
>> responsibility.
>> 
>> How “funding” would look like in the Python3 case is not so much sending 
>> money to the ASF,
>> but more for individual companies like your own, to sponsor (through 
>> developer time) the major
>> work on the patch, and driving it through to completion. Hopefully other 
>> users will contribute along
>> the way too.
>> 
>> You will of course need help from experienced developers, but the ideal 
>> situation is that after
>> a couple of such patches that get committed, you (or the developer working 
>> on the code) will be nominated 
>> as committer and can continue developing PyLucene without the need for Andi 
>> or any other one individual.
>> 
>>> There has been some discussions about the future of PyLucene on this list 
>>> but I still didn't see any conclusion/decision
>> 
>> 
>> The discussion sparked some new development and a release, which is a 
>> success. So the decission I guess is to keep PyLucene alive and try to 
>> strengthen the community.
>> As long as the project continues to produce releases, it is (somewhat) alive.
>> If on the other hand another year or two goes by without another release, 
>> I’m sure the PMC will take action again.
> 



Re: Installing PyLucene

2017-01-12 Thread Thomas Koch
Dear Andi,

many thanks for your review of the patch and helpful comments.

As mentioned in my previous mail to the list I’m afraid to let you know that we 
currently cannot put more effort into this task. This may change in the future 
of course.

However, with „funding“ my idea was to look for open source funding such as 
provided by the Python Software Foundation (e.g.):
https://www.python.org/psf/grants

That’s probably worth a try - especially because the PSF is well known, has 
some sponsors and also receives donations by companies using Python and Python 
related projects on regular basis…

> Thank you for the work done so far, it's looking really good but it needs to
> be refreshed to JCC/trunk and latest Python 3 to minimize work on my side.

Ok. Maybe ASF could contact PSF and ask for such a grant that could be uses to 
>hire back the contractor who did the JCC Python 3 port originally and have
>him/her refresh it for the latest JCC on trunk
? (If he/she is willing to do so … that’s another question).

Just thinking about ways to get this forward. I’m afraid I cannot provide more 
support currently ,-(


best regards,

Thomas 
—
> Am 06.01.2017 um 22:01 schrieb Andi Vajda :
> 
> 
> I now took a look at the python 3 patches you sent a link to in an earlier 
> message and here is the gist of my thoughts:
>  - Moving the Python 3 is desirable but what about Python 2 support today
>in 2017 ? I have no desire to support both for PyLucene manually. If,
>somehow, there can be two versions of JCC, one for Python 2, one for
>Python 3 and the PyLucene tests can be 2to3'd automatically, then the
>Python 3 support idea looks more attractive already. Supporting two
>versions of JCC is fine until 2020.
> 
>  - The JCC patches look very reasonable but should be updated to the latest
>Python 3. In particular, the internal Python 3 string representation was
>changed again after 3.2 (?) and has clever optimizations possible based
>on the internal byte size of characters chosen by Python (internally)
>for each string, based on the range of the characters used in the string.
>This makes it possible to often just copy chars from Python to Java.
>I just did a rewrite for this in PyICU (another long
>term project of mine, https://github.com/ovalhub/pyicu/ 
> ) and the Python 3
>string story got much cleaner post 3.2 (at least more
>understandable). Lots of bugs with long unicode chars (forgot the proper
>term, sorry) got fixed along the way (emoticon support, yay).
> 
>So, if you're prepared to fund this effort, it might be best to hire
>back the contractor who did the JCC Python 3 port originally and have
>him/her refresh it for the latest JCC on trunk (not too many changes
>happened in the past few years) and to the use the Python internal string
>APIs that appeared post Python 3.2. The ones in use in the patch are
>deprecated already. I love it that we'd then shed _all_ backwards
>compatibility baggage in JCC going forward in Python 3.x, x >= 6.
> 
>If you get the JCC/Python3 patches into a shape where I can apply them to
>trunk without trouble and using the latest CPython string APIs:
>   https://docs.python.org/3/c-api/unicode.html#c.PyUnicode_AsUCS4 
> 
>and related (PyUnicode_KIND, etc...)
>then there is a good chance that PyLucene/JCC would be fully supported
>with Python 3.x, x >= 6.
> 
>  - The PyLucene patches should probably be redone so that they can be
>automated with 2to3. If we get JCC in shape, I can take care of the rest.
> 
> Thank you for the work done so far, it's looking really good but it needs to
> be refreshed to JCC/trunk and latest Python 3 to minimize work on my side.
> 
> Andi..



Re: Installing PyLucene

2017-01-12 Thread Thomas Koch
Dear Petrus, 
thanks for your feedback - good to know that it’s useful for you application. 
And at least one more user who asks for Python3 Support in JCC ,-)

best regards,
Thomas 
—
> Am 11.01.2017 um 23:14 schrieb Petrus Hyvönen :
> 
> Dear Thomas,
> 
> Thanks for the patch files, I am not using pylucene so I have not tried that 
> part, I am wrapping another java library (orekit). I have now built a JCC on 
> your JCC patch applied on JCCv2.22. The test suite and application I have for 
> my project runs fine with this patch under python 3, on mac, linux and 
> windows, I saw no deviations in behavior of the library compared to v2.7. 
> This is by far not a very deep test suite, but very good news.
> 
> With Best Regards
> /Petrus
> 
> 
> 
>> On 06 Jan 2017, at 10:07 , Thomas Koch > > wrote:
>> 
>> 
>>> Am 04.01.2017 um 10:59 schrieb Petrus Hyvönen >> >:
>>> 
>>> Dear Thomas,
>>> 
>>> I would be very interested in a python 3 port of JCC. I am not a very 
>>> skilled developer, looked at starting a development based on the old 
>>> python-3 version but it's beyond my current skills.
>>> 
>>> I would be happy to help and test and review the JCC patches, I think your 
>>> patches would be a valuable contribution to JCC.
>>> 
>>> With Best Regards
>>> /Petrus
>>> 
>> 
>> Dear Petrus,
>> the "patch" is available in this gist
>> https://gist.github.com/tommykoch/8b3cec18d6f3650d05d235c46ba3b055 
>> 
>> 
>> It consists of 3 files:
>>  - one build script (build.py)
>>  - a patch file for jcc (pylucene_3_6-jcc-P3.patch)
>>  - a patch file for pylucene3.6 (pylucene_3_6-P3.patch)
>>   
>> in our environment the 3 files are located in 
>>  /tools/build/pylucene
>> and the output (i.e. patched Pylucene36) is created in
>>  /build
>>  
>> if you create this structure you may simply run
>> $ cd tools/build/pylucene
>> $ build.py build
>> 
>> which will checkout Pylucene36 from SVN (in /build), apply the patch 
>> files and build JCC and PyLucene.
>> The Script is intended to run on Linux (or MacOS) - a diff binary and svn 
>> installation is required.
>> 
>> also easy_install(3) is needed to install the generated egg files -
>> besides the usual requirements for a PyLucene build (python3.4+, Java, gcc 
>> ...)
>> 
>> IMPORTANT NOTES:
>> - the patch is "one way" i.e. the patched Pylucene36 won't work with Py27 
>> anymore!
>> - the patch is for the old (and outdated) PyLucene36 version only - it has 
>> not yet been tested/ported to newer versions of JCC/Pylucene
>> - the patched JCC has only been used/tested with PyLucene - not with any 
>> other Java library
>> 
>> A review of a core developer of JCC/Pylucene would also be good - I’ll ask 
>> Andi what he thinks about this suggestion.
>> 
>> best regards,
>> 
>> Thomas
> 



Re: Installing PyLucene

2017-01-06 Thread Andi Vajda


On Fri, 6 Jan 2017, Jan Høydahl wrote:


Hi,

I hope you didn?t get this wrong! We all appreciate the existence of 
JCC/PyLucene and especially all the effort you?ve put into this.



PyLucene is driven by its own community, and user involvement and contributions 
is a must.
The (sub)project will survive only to the extent that its current users invest 
in it.


So if some funding is required to get this going ?


For an ASF Open Source Project, the only thing that is required to get going is 
user/developer
involvement and teamwork. While Andi started the project due to needs at the 
time, and became
a committer, he is no longer an active user, so perhaps time has come for other 
users to step ut and take
responsibility.

How ?funding? would look like in the Python3 case is not so much sending money 
to the ASF,
but more for individual companies like your own, to sponsor (through developer 
time) the major
work on the patch, and driving it through to completion. Hopefully other users 
will contribute along
the way too.

You will of course need help from experienced developers, but the ideal 
situation is that after
a couple of such patches that get committed, you (or the developer working on 
the code) will be nominated
as committer and can continue developing PyLucene without the need for Andi or 
any other one individual.


There has been some discussions about the future of PyLucene on this list but I 
still didn't see any conclusion/decision



The discussion sparked some new development and a release, which is a success. 
So the decission I guess is to keep PyLucene alive and try to strengthen the 
community.
As long as the project continues to produce releases, it is (somewhat) alive.
If on the other hand another year or two goes by without another release, I?m 
sure the PMC will take action again.


I intend to produce a PyLucene 6.4 release once Lucene 6.4 is done.
It's been a few months now...

Andi..



--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com


6. jan. 2017 kl. 10.34 skrev Thomas Koch :

Dear Andi,

I?ve just sent the link to the public gist with the patch to Petrus and this list. As 
mentioned by Oliver we?d be more than happy if a core developer of JCC/PyLucene could 
review the patch and decide what to do with it. It has been developed without intimate 
knowledge of JCC with the goal to make PyLucene(36) usable with Python3. It may have some 
issues or need improvements (also cf. "IMPORTANT NOTES" in my last email about 
current limitations of the patch). That?s where export review (and effort) is needed.

For the future of course a port to newer versions of JCC/PyLucene would be more 
than valuable. I think what Oliver wanted to express is that we don?t have that 
much deep know how of JCC and can thus can only provide initial efforts and 
contributions, but for production/release ready code an export review is still 
needed. Also we haven?t watched the development of newer versions of PyLucene 
as we?re still stuck with PyLucene36.

I hope you didn?t get this wrong! We all appreciate the existence of 
JCC/PyLucene and especially all the effort you?ve put into this.

However, I fear that Python 3 support is a must-have for a Python tool or 
library that's available today:
- Python3 is here to stay! (py3.6 has just been released)
- Most of the popular Python packages do meanwhile provide Python3 support - cf. 
http://py3readiness.org 
- Python2 support will end by 2020 (sounds far away but isn't - cf.  
https://pythonclock.org  )

There has been some discussions about the future of PyLucene on this list but I 
still didn't see any conclusion/decision. Without a transparent roadmap and 
ongoing development (i.e. new releases, Python3 support etc.) the usage of 
JCC/PyLucene is most likely unattractive for developers who start a new project 
and this is where the user base shrinks and further contributions are stalled 
(somehow a chicken-egg-problem).

I'm not sure how far the ASF may help here, but I've read that the Python 
Software Foundation occasionally funds projects to port libraries that are 
widely used but don't have enough of a community to do a port.
cf. 
https://developers.slashdot.org/story/13/08/25/2115204/interviews-guido-van-rossum-answers-your-questions
 


So if some funding is required to get this going ...



best regards,

Thomas
?

Am 04.01.2017 um 19:41 schrieb Andi Vajda :



Note that PyLucene currently lacks official Python3 support!
We've done a port of PyLucene 3.6 (!) to support Python3 and offered the 
patches needed to JCC and PyLucene for use/review on the list - but didn't get 
any feedback so far.
cf. https://www.mail-archive.com/pylucene-dev@lucene.apache.org/msg02167.html 

Re: Installing PyLucene

2017-01-06 Thread Andi Vajda


 Hi Thomas,

On Fri, 6 Jan 2017, Thomas Koch wrote:

I?ve just sent the link to the public gist with the patch to Petrus and 
this list. As mentioned by Oliver we?d be more than happy if a core 
developer of JCC/PyLucene could review the patch and decide what to do 
with it. It has been developed without intimate knowledge of JCC with the 
goal to make PyLucene(36) usable with Python3. It may have some issues or 
need improvements (also cf. "IMPORTANT NOTES" in my last email about 
current limitations of the patch). That?s where export review (and effort) 
is needed.


For the future of course a port to newer versions of JCC/PyLucene would be 
more than valuable. I think what Oliver wanted to express is that we don?t 
have that much deep know how of JCC and can thus can only provide initial 
efforts and contributions, but for production/release ready code an export 
review is still needed. Also we haven?t watched the development of newer 
versions of PyLucene as we?re still stuck with PyLucene36.


I hope you didn?t get this wrong! We all appreciate the existence of 
JCC/PyLucene and especially all the effort you?ve put into this.


However, I fear that Python 3 support is a must-have for a Python tool or 
library that's available today:
- Python3 is here to stay! (py3.6 has just been released)
- Most of the popular Python packages do meanwhile provide Python3 support - cf. 
http://py3readiness.org 
- Python2 support will end by 2020 (sounds far away but isn't - cf.  
https://pythonclock.org  )

There has been some discussions about the future of PyLucene on this list 
but I still didn't see any conclusion/decision. Without a transparent 
roadmap and ongoing development (i.e. new releases, Python3 support etc.) 
the usage of JCC/PyLucene is most likely unattractive for developers who 
start a new project and this is where the user base shrinks and further 
contributions are stalled (somehow a chicken-egg-problem).


I'm not sure how far the ASF may help here, but I've read that the Python 
Software Foundation occasionally funds projects to port libraries that are 
widely used but don't have enough of a community to do a port.
cf. 
https://developers.slashdot.org/story/13/08/25/2115204/interviews-guido-van-rossum-answers-your-questions
 


So if some funding is required to get this going ...


I now took a look at the python 3 patches you sent a link to in an earlier 
message and here is the gist of my thoughts:

  - Moving the Python 3 is desirable but what about Python 2 support today
in 2017 ? I have no desire to support both for PyLucene manually. If,
somehow, there can be two versions of JCC, one for Python 2, one for
Python 3 and the PyLucene tests can be 2to3'd automatically, then the
Python 3 support idea looks more attractive already. Supporting two
versions of JCC is fine until 2020.

  - The JCC patches look very reasonable but should be updated to the latest
Python 3. In particular, the internal Python 3 string representation was
changed again after 3.2 (?) and has clever optimizations possible based
on the internal byte size of characters chosen by Python (internally)
for each string, based on the range of the characters used in the string.
This makes it possible to often just copy chars from Python to Java.
I just did a rewrite for this in PyICU (another long
term project of mine, https://github.com/ovalhub/pyicu/) and the Python 3
string story got much cleaner post 3.2 (at least more
understandable). Lots of bugs with long unicode chars (forgot the proper
term, sorry) got fixed along the way (emoticon support, yay).

So, if you're prepared to fund this effort, it might be best to hire
back the contractor who did the JCC Python 3 port originally and have
him/her refresh it for the latest JCC on trunk (not too many changes
happened in the past few years) and to the use the Python internal string
APIs that appeared post Python 3.2. The ones in use in the patch are
deprecated already. I love it that we'd then shed _all_ backwards
compatibility baggage in JCC going forward in Python 3.x, x >= 6.

If you get the JCC/Python3 patches into a shape where I can apply them to
trunk without trouble and using the latest CPython string APIs:
   https://docs.python.org/3/c-api/unicode.html#c.PyUnicode_AsUCS4
and related (PyUnicode_KIND, etc...)
then there is a good chance that PyLucene/JCC would be fully supported
with Python 3.x, x >= 6.

  - The PyLucene patches should probably be redone so that they can be
automated with 2to3. If we get JCC in shape, I can take care of the rest.

Thank you for the work done so far, it's looking really good but it needs to
be refreshed to JCC/trunk and latest Python 3 to minimize work on my side.

Re: Installing PyLucene

2017-01-06 Thread Jan Høydahl
Hi,

> I hope you didn’t get this wrong! We all appreciate the existence of 
> JCC/PyLucene and especially all the effort you’ve put into this.  


PyLucene is driven by its own community, and user involvement and contributions 
is a must.
The (sub)project will survive only to the extent that its current users invest 
in it.

> So if some funding is required to get this going …

For an ASF Open Source Project, the only thing that is required to get going is 
user/developer
involvement and teamwork. While Andi started the project due to needs at the 
time, and became
a committer, he is no longer an active user, so perhaps time has come for other 
users to step ut and take
responsibility.

How “funding” would look like in the Python3 case is not so much sending money 
to the ASF,
but more for individual companies like your own, to sponsor (through developer 
time) the major
work on the patch, and driving it through to completion. Hopefully other users 
will contribute along
the way too.

You will of course need help from experienced developers, but the ideal 
situation is that after
a couple of such patches that get committed, you (or the developer working on 
the code) will be nominated 
as committer and can continue developing PyLucene without the need for Andi or 
any other one individual.

> There has been some discussions about the future of PyLucene on this list but 
> I still didn't see any conclusion/decision


The discussion sparked some new development and a release, which is a success. 
So the decission I guess is to keep PyLucene alive and try to strengthen the 
community.
As long as the project continues to produce releases, it is (somewhat) alive.
If on the other hand another year or two goes by without another release, I’m 
sure the PMC will take action again.

--
Jan Høydahl, search solution architect
Cominvent AS - www.cominvent.com

> 6. jan. 2017 kl. 10.34 skrev Thomas Koch :
> 
> Dear Andi,
> 
> I’ve just sent the link to the public gist with the patch to Petrus and this 
> list. As mentioned by Oliver we’d be more than happy if a core developer of 
> JCC/PyLucene could review the patch and decide what to do with it. It has 
> been developed without intimate knowledge of JCC with the goal to make 
> PyLucene(36) usable with Python3. It may have some issues or need 
> improvements (also cf. "IMPORTANT NOTES" in my last email about current 
> limitations of the patch). That’s where export review (and effort) is needed. 
> 
> For the future of course a port to newer versions of JCC/PyLucene would be 
> more than valuable. I think what Oliver wanted to express is that we don’t 
> have that much deep know how of JCC and can thus can only provide initial 
> efforts and contributions, but for production/release ready code an export 
> review is still needed. Also we haven’t watched the development of newer 
> versions of PyLucene as we’re still stuck with PyLucene36.
> 
> I hope you didn’t get this wrong! We all appreciate the existence of 
> JCC/PyLucene and especially all the effort you’ve put into this.  
> 
> However, I fear that Python 3 support is a must-have for a Python tool or 
> library that's available today:
> - Python3 is here to stay! (py3.6 has just been released)
> - Most of the popular Python packages do meanwhile provide Python3 support - 
> cf. http://py3readiness.org 
> - Python2 support will end by 2020 (sounds far away but isn't - cf.  
> https://pythonclock.org  )
> 
> There has been some discussions about the future of PyLucene on this list but 
> I still didn't see any conclusion/decision. Without a transparent roadmap and 
> ongoing development (i.e. new releases, Python3 support etc.) the usage of 
> JCC/PyLucene is most likely unattractive for developers who start a new 
> project and this is where the user base shrinks and further contributions are 
> stalled (somehow a chicken-egg-problem).
> 
> I'm not sure how far the ASF may help here, but I've read that the Python 
> Software Foundation occasionally funds projects to port libraries that are 
> widely used but don't have enough of a community to do a port.
> cf. 
> https://developers.slashdot.org/story/13/08/25/2115204/interviews-guido-van-rossum-answers-your-questions
>  
> 
> 
> So if some funding is required to get this going ...
> 
> 
> 
> best regards,
> 
> Thomas
> — 
>> Am 04.01.2017 um 19:41 schrieb Andi Vajda :
>> 
>>> 
>>> Note that PyLucene currently lacks official Python3 support!
>>> We've done a port of PyLucene 3.6 (!) to support Python3 and offered the 
>>> patches needed to JCC and PyLucene for use/review on the list - but didn't 
>>> get any feedback so far. 
>>> cf. 
>>> https://www.mail-archive.com/pylucene-dev@lucene.apache.org/msg02167.html 
>>> 

Re: Installing PyLucene

2017-01-06 Thread Thomas Koch
Dear Andi,

I’ve just sent the link to the public gist with the patch to Petrus and this 
list. As mentioned by Oliver we’d be more than happy if a core developer of 
JCC/PyLucene could review the patch and decide what to do with it. It has been 
developed without intimate knowledge of JCC with the goal to make PyLucene(36) 
usable with Python3. It may have some issues or need improvements (also cf. 
"IMPORTANT NOTES" in my last email about current limitations of the patch). 
That’s where export review (and effort) is needed. 

For the future of course a port to newer versions of JCC/PyLucene would be more 
than valuable. I think what Oliver wanted to express is that we don’t have that 
much deep know how of JCC and can thus can only provide initial efforts and 
contributions, but for production/release ready code an export review is still 
needed. Also we haven’t watched the development of newer versions of PyLucene 
as we’re still stuck with PyLucene36.

I hope you didn’t get this wrong! We all appreciate the existence of 
JCC/PyLucene and especially all the effort you’ve put into this.  

However, I fear that Python 3 support is a must-have for a Python tool or 
library that's available today:
- Python3 is here to stay! (py3.6 has just been released)
- Most of the popular Python packages do meanwhile provide Python3 support - 
cf. http://py3readiness.org 
- Python2 support will end by 2020 (sounds far away but isn't - cf.  
https://pythonclock.org  )

There has been some discussions about the future of PyLucene on this list but I 
still didn't see any conclusion/decision. Without a transparent roadmap and 
ongoing development (i.e. new releases, Python3 support etc.) the usage of 
JCC/PyLucene is most likely unattractive for developers who start a new project 
and this is where the user base shrinks and further contributions are stalled 
(somehow a chicken-egg-problem).

I'm not sure how far the ASF may help here, but I've read that the Python 
Software Foundation occasionally funds projects to port libraries that are 
widely used but don't have enough of a community to do a port.
cf. 
https://developers.slashdot.org/story/13/08/25/2115204/interviews-guido-van-rossum-answers-your-questions
 


So if some funding is required to get this going ...



best regards,

Thomas
— 
> Am 04.01.2017 um 19:41 schrieb Andi Vajda :
> 
>> 
>> Note that PyLucene currently lacks official Python3 support!
>> We've done a port of PyLucene 3.6 (!) to support Python3 and offered the 
>> patches needed to JCC and PyLucene for use/review on the list - but didn't 
>> get any feedback so far. 
>> cf. 
>> https://www.mail-archive.com/pylucene-dev@lucene.apache.org/msg02167.html 
>>  
>> > >
> 
> Indeed, re-reading this thread, I remember now. There is no patch attached 
> and the tone of the contribution offer is a little off putting. It comes 
> across more as a one time abandon-ware contribution as something with authors 
> standing behind ready to respond to code review comments. I have a similar 
> python 3 jcc patch sitting in an svn branch that could be revived. I've 
> stated in the past that I intended to do so but lacked time. Interest in a 
> Python 3 jcc has been scant so I haven't put much priority into this task.
> 
> Andi..
> 
> 



Re: Installing PyLucene

2017-01-06 Thread Thomas Koch

> Am 04.01.2017 um 10:59 schrieb Petrus Hyvönen :
> 
> Dear Thomas,
> 
> I would be very interested in a python 3 port of JCC. I am not a very skilled 
> developer, looked at starting a development based on the old python-3 version 
> but it's beyond my current skills.
> 
> I would be happy to help and test and review the JCC patches, I think your 
> patches would be a valuable contribution to JCC.
> 
> With Best Regards
> /Petrus
> 

Dear Petrus,
the "patch" is available in this gist
https://gist.github.com/tommykoch/8b3cec18d6f3650d05d235c46ba3b055 


It consists of 3 files:
 - one build script (build.py)
 - a patch file for jcc (pylucene_3_6-jcc-P3.patch)
 - a patch file for pylucene3.6 (pylucene_3_6-P3.patch)
  
in our environment the 3 files are located in 
 /tools/build/pylucene
and the output (i.e. patched Pylucene36) is created in
 /build
 
if you create this structure you may simply run
$ cd tools/build/pylucene
$ build.py build

which will checkout Pylucene36 from SVN (in /build), apply the patch 
files and build JCC and PyLucene.
The Script is intended to run on Linux (or MacOS) - a diff binary and svn 
installation is required.

also easy_install(3) is needed to install the generated egg files -
besides the usual requirements for a PyLucene build (python3.4+, Java, gcc ...)

IMPORTANT NOTES:
- the patch is "one way" i.e. the patched Pylucene36 won't work with Py27 
anymore!
- the patch is for the old (and outdated) PyLucene36 version only - it has not 
yet been tested/ported to newer versions of JCC/Pylucene
- the patched JCC has only been used/tested with PyLucene - not with any other 
Java library

A review of a core developer of JCC/Pylucene would also be good - I’ll ask Andi 
what he thinks about this suggestion.

best regards,

Thomas

Re: Installing PyLucene

2017-01-05 Thread Andi Vajda

> On Jan 5, 2017, at 08:57, marco turchi  wrote:
> 
> Done! all testes passed!

Excellent !

> 
> thanks a lot!
> Marco
> 
>> On Thu, Jan 5, 2017 at 5:21 PM, Andi Vajda  wrote:
>> 
>> 
>>> On Jan 5, 2017, at 07:27, marco turchi  wrote:
>>> 
>>> Perfect!!!
>>> 
>>> For now, I keep the version as it is. I'll try later to install jcc with
>>> --shared flag, because I'm not sure if the patch for the setuptools
>>> requires root access.
>> 
>> Your JCC install is fine. It's PyLucene that needs to be rebuilt by adding
>> a --shared arg to its jcc invocation command line in its Makefile. No
>> setuptools patching necessary.
>> 
>> Andi..
>> 
>>> 
>>> Thanks a lot for your help!
>>> Marco
>>> 
 On Thu, Jan 5, 2017 at 2:27 AM, Andi Vajda  wrote:
 
 
> On Jan 4, 2017, at 13:51, marco turchi  wrote:
> 
> No I didn't.
> 
> I have run the codes in sample and they work. For my project the
> functionalities in the samples are enough. If necessary I can recompile
 jcc
> with --shared. What do you suggest?
 
 If you don't use --shared then the jcc that is linked into PyLucene is
>> not
 running shared mode and the test failure you're seeing is due to that.
 
 It's easy enough to rebuild PyLucene with --shared.
 Up to you !
 
 Andi..
 
> 
> Best
> Marco
> 
> 
> Il 04 Gen 2017 19:42, "Andi Vajda"  ha scritto:
> 
> 
>> On Jan 4, 2017, at 04:24, marco turchi 
>> wrote:
>> 
>> Dear Andi and Thomas,
>> following your advice I have removed the Windows error.
>> 
>> I still have this
>> 
>> ERROR: testThroughLayerException (__main__.PythonExceptionTestCase)
>> 
>> To answer Andi, I have printed the config.SHARED just before the error
 and
>> the output is true, in my opinion, showing that the shared mode is
 enabled
>> when running tests. Is this that you were mentioning in your email?
> 
> When you built PyLucene did you include --shared on the jcc invocation
> command line ?
> 
> Andi..
> 
>> 
>> Thanks a lot for your help!
>> Marco
>> 
>> 
>> On Wed, Jan 4, 2017 at 10:59 AM, Petrus Hyvönen <
 petrus.hyvo...@gmail.com>
>> wrote:
>> 
>>> Dear Thomas,
>>> 
>>> I would be very interested in a python 3 port of JCC. I am not a very
>>> skilled developer, looked at starting a development based on the old
>>> python-3 version but it's beyond my current skills.
>>> 
>>> I would be happy to help and test and review the JCC patches, I think
> your
>>> patches would be a valuable contribution to JCC.
>>> 
>>> With Best Regards
>>> /Petrus
>>> 
>>> 
>>> On Wed, Jan 4, 2017 at 9:13 AM, Thomas Koch 
>> wrote:
>>> 
> NameError: global name 'WindowsError' is not defined
 
 Note that PyLucene currently lacks official Python3 support!
 We've done a port of PyLucene 3.6 (!) to support Python3 and offered
 the
 patches needed to JCC and PyLucene for use/review on the list - but
>>> didn't
 get any feedback so far.
 cf. https://www.mail-archive.com/pylucene-dev@lucene.apache.
 org/msg02167.html 
 
 Regards,
 Thomas
 
>>> --
>>> _
>>> Petrus Hyvönen, Uppsala, Sweden
>>> Mobile Phone/SMS:+46 73 803 19 00
>>> 
 
 
>> 
>> 



Re: Installing PyLucene

2017-01-05 Thread marco turchi
Done! all testes passed!

thanks a lot!
Marco

On Thu, Jan 5, 2017 at 5:21 PM, Andi Vajda  wrote:

>
> > On Jan 5, 2017, at 07:27, marco turchi  wrote:
> >
> > Perfect!!!
> >
> > For now, I keep the version as it is. I'll try later to install jcc with
> > --shared flag, because I'm not sure if the patch for the setuptools
> > requires root access.
>
> Your JCC install is fine. It's PyLucene that needs to be rebuilt by adding
> a --shared arg to its jcc invocation command line in its Makefile. No
> setuptools patching necessary.
>
> Andi..
>
> >
> > Thanks a lot for your help!
> > Marco
> >
> >> On Thu, Jan 5, 2017 at 2:27 AM, Andi Vajda  wrote:
> >>
> >>
> >>> On Jan 4, 2017, at 13:51, marco turchi  wrote:
> >>>
> >>> No I didn't.
> >>>
> >>> I have run the codes in sample and they work. For my project the
> >>> functionalities in the samples are enough. If necessary I can recompile
> >> jcc
> >>> with --shared. What do you suggest?
> >>
> >> If you don't use --shared then the jcc that is linked into PyLucene is
> not
> >> running shared mode and the test failure you're seeing is due to that.
> >>
> >> It's easy enough to rebuild PyLucene with --shared.
> >> Up to you !
> >>
> >> Andi..
> >>
> >>>
> >>> Best
> >>> Marco
> >>>
> >>>
> >>> Il 04 Gen 2017 19:42, "Andi Vajda"  ha scritto:
> >>>
> >>>
>  On Jan 4, 2017, at 04:24, marco turchi 
> wrote:
> 
>  Dear Andi and Thomas,
>  following your advice I have removed the Windows error.
> 
>  I still have this
> 
>  ERROR: testThroughLayerException (__main__.PythonExceptionTestCase)
> 
>  To answer Andi, I have printed the config.SHARED just before the error
> >> and
>  the output is true, in my opinion, showing that the shared mode is
> >> enabled
>  when running tests. Is this that you were mentioning in your email?
> >>>
> >>> When you built PyLucene did you include --shared on the jcc invocation
> >>> command line ?
> >>>
> >>> Andi..
> >>>
> 
>  Thanks a lot for your help!
>  Marco
> 
> 
>  On Wed, Jan 4, 2017 at 10:59 AM, Petrus Hyvönen <
> >> petrus.hyvo...@gmail.com>
>  wrote:
> 
> > Dear Thomas,
> >
> > I would be very interested in a python 3 port of JCC. I am not a very
> > skilled developer, looked at starting a development based on the old
> > python-3 version but it's beyond my current skills.
> >
> > I would be happy to help and test and review the JCC patches, I think
> >>> your
> > patches would be a valuable contribution to JCC.
> >
> > With Best Regards
> > /Petrus
> >
> >
> > On Wed, Jan 4, 2017 at 9:13 AM, Thomas Koch 
> wrote:
> >
> >>> NameError: global name 'WindowsError' is not defined
> >>
> >> Note that PyLucene currently lacks official Python3 support!
> >> We've done a port of PyLucene 3.6 (!) to support Python3 and offered
> >> the
> >> patches needed to JCC and PyLucene for use/review on the list - but
> > didn't
> >> get any feedback so far.
> >> cf. https://www.mail-archive.com/pylucene-dev@lucene.apache.
> >> org/msg02167.html  >> pylucene-dev@lucene.apache.org/msg02167.html>
> >>
> >> Regards,
> >> Thomas
> >>
> > --
> > _
> > Petrus Hyvönen, Uppsala, Sweden
> > Mobile Phone/SMS:+46 73 803 19 00
> >
> >>
> >>
>
>


Re: Installing PyLucene

2017-01-05 Thread Andi Vajda

> On Jan 5, 2017, at 07:27, marco turchi  wrote:
> 
> Perfect!!!
> 
> For now, I keep the version as it is. I'll try later to install jcc with
> --shared flag, because I'm not sure if the patch for the setuptools
> requires root access.

Your JCC install is fine. It's PyLucene that needs to be rebuilt by adding a 
--shared arg to its jcc invocation command line in its Makefile. No setuptools 
patching necessary.

Andi..

> 
> Thanks a lot for your help!
> Marco
> 
>> On Thu, Jan 5, 2017 at 2:27 AM, Andi Vajda  wrote:
>> 
>> 
>>> On Jan 4, 2017, at 13:51, marco turchi  wrote:
>>> 
>>> No I didn't.
>>> 
>>> I have run the codes in sample and they work. For my project the
>>> functionalities in the samples are enough. If necessary I can recompile
>> jcc
>>> with --shared. What do you suggest?
>> 
>> If you don't use --shared then the jcc that is linked into PyLucene is not
>> running shared mode and the test failure you're seeing is due to that.
>> 
>> It's easy enough to rebuild PyLucene with --shared.
>> Up to you !
>> 
>> Andi..
>> 
>>> 
>>> Best
>>> Marco
>>> 
>>> 
>>> Il 04 Gen 2017 19:42, "Andi Vajda"  ha scritto:
>>> 
>>> 
 On Jan 4, 2017, at 04:24, marco turchi  wrote:
 
 Dear Andi and Thomas,
 following your advice I have removed the Windows error.
 
 I still have this
 
 ERROR: testThroughLayerException (__main__.PythonExceptionTestCase)
 
 To answer Andi, I have printed the config.SHARED just before the error
>> and
 the output is true, in my opinion, showing that the shared mode is
>> enabled
 when running tests. Is this that you were mentioning in your email?
>>> 
>>> When you built PyLucene did you include --shared on the jcc invocation
>>> command line ?
>>> 
>>> Andi..
>>> 
 
 Thanks a lot for your help!
 Marco
 
 
 On Wed, Jan 4, 2017 at 10:59 AM, Petrus Hyvönen <
>> petrus.hyvo...@gmail.com>
 wrote:
 
> Dear Thomas,
> 
> I would be very interested in a python 3 port of JCC. I am not a very
> skilled developer, looked at starting a development based on the old
> python-3 version but it's beyond my current skills.
> 
> I would be happy to help and test and review the JCC patches, I think
>>> your
> patches would be a valuable contribution to JCC.
> 
> With Best Regards
> /Petrus
> 
> 
> On Wed, Jan 4, 2017 at 9:13 AM, Thomas Koch  wrote:
> 
>>> NameError: global name 'WindowsError' is not defined
>> 
>> Note that PyLucene currently lacks official Python3 support!
>> We've done a port of PyLucene 3.6 (!) to support Python3 and offered
>> the
>> patches needed to JCC and PyLucene for use/review on the list - but
> didn't
>> get any feedback so far.
>> cf. https://www.mail-archive.com/pylucene-dev@lucene.apache.
>> org/msg02167.html > pylucene-dev@lucene.apache.org/msg02167.html>
>> 
>> Regards,
>> Thomas
>> 
> --
> _
> Petrus Hyvönen, Uppsala, Sweden
> Mobile Phone/SMS:+46 73 803 19 00
> 
>> 
>> 



Re: Installing PyLucene

2017-01-04 Thread marco turchi
Dear Andi and Thomas,
following your advice I have removed the Windows error.

I still have this

ERROR: testThroughLayerException (__main__.PythonExceptionTestCase)

To answer Andi, I have printed the config.SHARED just before the error and
the output is true, in my opinion, showing that the shared mode is enabled
when running tests. Is this that you were mentioning in your email?

Thanks a lot for your help!
Marco


On Wed, Jan 4, 2017 at 10:59 AM, Petrus Hyvönen 
wrote:

> Dear Thomas,
>
> I would be very interested in a python 3 port of JCC. I am not a very
> skilled developer, looked at starting a development based on the old
> python-3 version but it's beyond my current skills.
>
> I would be happy to help and test and review the JCC patches, I think your
> patches would be a valuable contribution to JCC.
>
> With Best Regards
> /Petrus
>
>
> On Wed, Jan 4, 2017 at 9:13 AM, Thomas Koch  wrote:
>
> > > NameError: global name 'WindowsError' is not defined
> >
> > Note that PyLucene currently lacks official Python3 support!
> > We've done a port of PyLucene 3.6 (!) to support Python3 and offered the
> > patches needed to JCC and PyLucene for use/review on the list - but
> didn't
> > get any feedback so far.
> > cf. https://www.mail-archive.com/pylucene-dev@lucene.apache.
> > org/msg02167.html  > pylucene-dev@lucene.apache.org/msg02167.html>
> >
> > Regards,
> > Thomas
> >
> --
> _
> Petrus Hyvönen, Uppsala, Sweden
> Mobile Phone/SMS:+46 73 803 19 00
>


Re: Installing PyLucene

2017-01-04 Thread Petrus Hyvönen
Dear Thomas,

I would be very interested in a python 3 port of JCC. I am not a very
skilled developer, looked at starting a development based on the old
python-3 version but it's beyond my current skills.

I would be happy to help and test and review the JCC patches, I think your
patches would be a valuable contribution to JCC.

With Best Regards
/Petrus


On Wed, Jan 4, 2017 at 9:13 AM, Thomas Koch  wrote:

> > NameError: global name 'WindowsError' is not defined
>
> Note that PyLucene currently lacks official Python3 support!
> We've done a port of PyLucene 3.6 (!) to support Python3 and offered the
> patches needed to JCC and PyLucene for use/review on the list - but didn't
> get any feedback so far.
> cf. https://www.mail-archive.com/pylucene-dev@lucene.apache.
> org/msg02167.html  pylucene-dev@lucene.apache.org/msg02167.html>
>
> Regards,
> Thomas
>
-- 
_
Petrus Hyvönen, Uppsala, Sweden
Mobile Phone/SMS:+46 73 803 19 00


Re: Installing PyLucene

2017-01-03 Thread Andi Vajda


On Tue, 3 Jan 2017, marco turchi wrote:


Nope different linux kernels and python versions (2.7.11 and 2.7.12).

Btw I have also similar problem on the machine with Web access.


I suspect you don't have shared mode enabled when running tests.
The WindowsError exception is a bug that no one hits until the tests fails 
to remove its STORE_DIR tree. I need to remove this...

You can remove that try/except bracket since it doesn't apply to you anyway.

Usually, errors with test_PythonException.py have to do with missing shared 
mode. If PyLucene is otherwise working for you, you can ignore this or make 
sure shared mode is actually deployed with PyLucene.


Andi..



Best,
Marco

On Tue, Jan 3, 2017 at 10:05 PM, Andi Vajda  wrote:



On Tue, 3 Jan 2017, marco turchi wrote:

Dear Andi,

following you suggestions, I have first installed pyLucene on a machine
with access to the Web and than I have copied the tree on the cluster
machine where I have installed pyLucene.

Running the make test I have the following errors:
ERROR: testThroughLayerException (__main__.PythonExceptionTestCase)
--
Traceback (most recent call last):
 File "test/test_PythonException.py", line 34, in
testThroughLayerException
   qp.parse("foo bar")
JavaError: , >
   Java stacktrace:
java.lang.RuntimeException: TestException
at
org.apache.pylucene.queryparser.classic.PythonQueryParser.ge
tFieldQuery_quoted(Native
Method)
at
org.apache.pylucene.queryparser.classic.PythonQueryParser.ge
tFieldQuery(Unknown
Source
at
org.apache.lucene.queryparser.classic.QueryParser.MultiTerm(
QueryParser.java:585)
at
org.apache.lucene.queryparser.classic.QueryParser.Query(Quer
yParser.java:198)
at
org.apache.lucene.queryparser.classic.QueryParser.TopLevelQu
ery(QueryParser.java:187)
at
org.apache.lucene.queryparser.classic.QueryParserBase.parse(
QueryParserBase.java:111)

and:
NameError: global name 'WindowsError' is not defined
in
ERROR: test_FieldEnumeration (__main__.Test_PyLuceneWithFSStore)
ERROR: test_removeDocuments (__main__.Test_PyLuceneWithFSStore)
ERROR: test_searchDocuments (__main__.Test_PyLuceneWithFSStore)
...



Are both machines (the one on the web and the one offline) running the
samev version of Windows and Python ?

Andi..


I have checked on the mailing list but I have not found solutions that work

for me. I'm using:
python 2.7.12 (I have also tried python 3.5.2 but I have problems to
compile jcc)
java jdk1.8.0_60

do you have an idea of what it is not working?

Thanks a lot in advance for your help!
Marco




On Sat, Dec 31, 2016 at 4:09 AM, Andi Vajda  wrote:



On Dec 30, 2016, at 15:07, marco turchi  wrote:


Dear Andi,
thanks a lot for you answers!


You do not need root privileges if you don't modify the system python.



One



way to achieve that is to setup a python virtualenv first and install



jcc



and pylucene into it instead of the system python.



Do you mean to install a new version of python in one of my folders and



us


it for installing JCC and pyLucene?



No, I mean to setup a python virtualenv.

Andi..





I'm using a

version of python (2.7.5) available in anaconda and our cluster is not
connected to the WEB, so I cannot use setuptools.



You can use setuptools without a web connection, why not ?



Sorry, you are right I thought that setuptools needs to be connected to


the


Web to download the required libraries





Ah, here, to build Java Lucene, ivy is required and without a web
connection, it's going to be more difficult. You need to somehow make


sure



that all things ivy is going to download during the Lucene build (a one

time setup only) are already there when you build Lucene.
You could do this on an equivalent machine that has a web connection
and
then copy the local ivy tree to the machine that doesn't.



This is a great suggestion, thanks a lot! I'm going to try this in the


next


days!!

Best,
Marco




Andi..



resolve:

Am I doing anything wrong? do you have any suggestions to help me to
proceed with the installation?

Thanks a lot in advance for your help!

Best Regards,
Marco













Re: Installing PyLucene

2016-12-30 Thread Andi Vajda

> On Dec 30, 2016, at 15:07, marco turchi  wrote:
> 
> Dear Andi,
> thanks a lot for you answers!
> 
> 
>> You do not need root privileges if you don't modify the system python. One
>> way to achieve that is to setup a python virtualenv first and install jcc
>> and pylucene into it instead of the system python.
>> 
>> 
> Do you mean to install a new version of python in one of my folders and us
> it for installing JCC and pyLucene?

No, I mean to setup a python virtualenv.

Andi..


> 
> 
>>> I'm using a
>>> version of python (2.7.5) available in anaconda and our cluster is not
>>> connected to the WEB, so I cannot use setuptools.
>> 
>> You can use setuptools without a web connection, why not ?
>> 
> 
> Sorry, you are right I thought that setuptools needs to be connected to the
> Web to download the required libraries
> 
> 
>> 
>> 
>> Ah, here, to build Java Lucene, ivy is required and without a web
>> connection, it's going to be more difficult. You need to somehow make sure
>> that all things ivy is going to download during the Lucene build (a one
>> time setup only) are already there when you build Lucene.
>> You could do this on an equivalent machine that has a web connection and
>> then copy the local ivy tree to the machine that doesn't.
>> 
> 
> This is a great suggestion, thanks a lot! I'm going to try this in the next
> days!!
> 
> Best,
> Marco
> 
> 
>> 
>> Andi..
>> 
>>> 
>>> resolve:
>>> 
>>> Am I doing anything wrong? do you have any suggestions to help me to
>>> proceed with the installation?
>>> 
>>> Thanks a lot in advance for your help!
>>> 
>>> Best Regards,
>>> Marco
>> 
>> 


Re: Installing PyLucene

2016-12-30 Thread marco turchi
Dear Andi,
thanks a lot for you answers!


> You do not need root privileges if you don't modify the system python. One
> way to achieve that is to setup a python virtualenv first and install jcc
> and pylucene into it instead of the system python.
>
>
Do you mean to install a new version of python in one of my folders and us
it for installing JCC and pyLucene?


> > I'm using a
> > version of python (2.7.5) available in anaconda and our cluster is not
> > connected to the WEB, so I cannot use setuptools.
>
> You can use setuptools without a web connection, why not ?
>

Sorry, you are right I thought that setuptools needs to be connected to the
Web to download the required libraries


>
>
> Ah, here, to build Java Lucene, ivy is required and without a web
> connection, it's going to be more difficult. You need to somehow make sure
> that all things ivy is going to download during the Lucene build (a one
> time setup only) are already there when you build Lucene.
> You could do this on an equivalent machine that has a web connection and
> then copy the local ivy tree to the machine that doesn't.
>

This is a great suggestion, thanks a lot! I'm going to try this in the next
days!!

Best,
Marco


>
> Andi..
>
> >
> > resolve:
> >
> > Am I doing anything wrong? do you have any suggestions to help me to
> > proceed with the installation?
> >
> > Thanks a lot in advance for your help!
> >
> > Best Regards,
> > Marco
>
>


Re: Installing PyLucene

2016-12-30 Thread Andi Vajda

> On Dec 30, 2016, at 08:47, marco turchi  wrote:
> 
> Dear All,
> I'm newer with PyLucene and I'm trying to instal it on my local home on a
> cluster. In this environment, I do not have root privilege,

You do not need root privileges if you don't modify the system python. One way 
to achieve that is to setup a python virtualenv first and install jcc and 
pylucene into it instead of the system python.

> I'm using a
> version of python (2.7.5) available in anaconda and our cluster is not
> connected to the WEB, so I cannot use setuptools.

You can use setuptools without a web connection, why not ?

> I have followed the instructions for JCC and I have used:
> python setup.py build
> python setup.py install --users
> 
> and JCC is installed in $home/.local
> 
> Then I have started to install pyLucene, I have changed the Makefile (using
> the Linux (Debian Jessie 64-bit, Python 2.7.9, Oracle Java 1.8)
> configuration). The installation starts but it got stacked (for ages) here:
> ivy-configure:
> 
> [ivy:configure] :: loading settings :: file =
> /hltsrv0/turchi/Projects/QT21/WorkingFolder/NMT/software/pylucene-6.2.0/lucene-java-6.2.0/lucene/top-level-ivy-settings.xml

Ah, here, to build Java Lucene, ivy is required and without a web connection, 
it's going to be more difficult. You need to somehow make sure that all things 
ivy is going to download during the Lucene build (a one time setup only) are 
already there when you build Lucene.
You could do this on an equivalent machine that has a web connection and then 
copy the local ivy tree to the machine that doesn't.

Andi..

> 
> resolve:
> 
> Am I doing anything wrong? do you have any suggestions to help me to
> proceed with the installation?
> 
> Thanks a lot in advance for your help!
> 
> Best Regards,
> Marco



Installing PyLucene

2016-12-30 Thread marco turchi
Dear All,
I'm newer with PyLucene and I'm trying to instal it on my local home on a
cluster. In this environment, I do not have root privilege, I'm using a
version of python (2.7.5) available in anaconda and our cluster is not
connected to the WEB, so I cannot use setuptools.

I have followed the instructions for JCC and I have used:
python setup.py build
python setup.py install --users

and JCC is installed in $home/.local

Then I have started to install pyLucene, I have changed the Makefile (using
the Linux (Debian Jessie 64-bit, Python 2.7.9, Oracle Java 1.8)
configuration). The installation starts but it got stacked (for ages) here:
ivy-configure:

[ivy:configure] :: loading settings :: file =
/hltsrv0/turchi/Projects/QT21/WorkingFolder/NMT/software/pylucene-6.2.0/lucene-java-6.2.0/lucene/top-level-ivy-settings.xml

resolve:

Am I doing anything wrong? do you have any suggestions to help me to
proceed with the installation?

Thanks a lot in advance for your help!

Best Regards,
Marco


Re: Installing pylucene on machos 10.11

2016-07-04 Thread Andi Vajda


On Mon, 4 Jul 2016, Tom Kealy Kealy wrote:


Dear Lucene-dev,

I'm having difficulty installing pylucene on mac OS X 'El Captian' 10.11.

I've checked out the jcc source code:

   svn co http://svn.apache.org/repos/asf/lucene/pylucene/trunk/jcc bcc

i've got idk 1.8, and have edited the setup.py file to target idk 1.8.

When I try to build with the following commands

   $ python setup.py build
   $ sudo python setup.py install

I get the following error:

   found JAVAHOME =
/Library/Java/JavaVirtualMachines/jdk1.8.0_91.jdk/Contents/Home
   found JAVAFRAMEWORKS = /System/Library/Frameworks/JavaVM.framework

/Users/tk12098/anaconda/lib/python2.7/site-packages/setuptools-20.3-py2.7.egg/pkg_resources/__init__.py:194:
RuntimeWarning: You have iterated over the result of
pkg_resources.parse_version. This is a legacy behavior which is
inconsistent with the new version class introduced in setuptools 8.0. In
most cases, conversion to a tuple is unnecessary. For comparison of
versions, sort the Version instances directly. If you have another use case
requiring the tuple, please file a bug with the setuptools project
describing that need.
   Traceback (most recent call last):
 File "setup.py", line 209, in 
   ''')
   RuntimeError:

   Please set the environment variable MACOSX_DEPLOYMENT_TARGET to at
least 10.5.

This happens after the second command ('sudo python setup.py install').


So JCC builds but does not install ?


I've checked with `printenv` and `MACOSX_DEPOLYMENT_TARGET=10.11`.


Is that the case under 'sudo', though ?
What does 'sudo printenv' return ?

Andi..



I'm not sure how to resolve this.

Tom



AW: Problems installing Pylucene on Ubuntu 12.04

2014-03-07 Thread Ritzschke, Uwe
Thanks for the quick reply. The tests work fine with that patch.

Uwe


On Thu, 6 Mar 2014, Ritzschke, Uwe wrote:

 Hello,

 I'm facing problems with installing Pylucene on an Ubuntu 12.04 Server 
 (32bit). Perhaps someone can give me some helpful advice?
 I've followed the official installation instructions [1]. It seems that 
 building and installing JCC works fine. Also, running make to build 
 Pylucene seems to succeed. But if I run make test, I get the errors 
 attached below.

It looks like there is a left-over 'import pdb; pdb.set_trace()' statement in 
the test_PythonDirectory.py test, at line 260.
Please, remove it and re-run the tests.

Thanks !

Andi..


Problems installing Pylucene on Ubuntu 12.04

2014-03-06 Thread Ritzschke, Uwe
Hello,

I'm facing problems with installing Pylucene on an Ubuntu 12.04 Server (32bit). 
Perhaps someone can give me some helpful advice?
I've followed the official installation instructions [1]. It seems that 
building and installing JCC works fine. Also, running make to build Pylucene 
seems to succeed. But if I run make test, I get the errors attached below.


Thank you in advance!
Uwe

1: http://lucene.apache.org/pylucene/install.html



Output of make test (shortened):

[...]

==
ERROR: test_FieldEnumeration (__main__.PythonDirectoryTests)
--
Traceback (most recent call last):
  File /root/pylucene-4.6.1-1/test/test_PyLucene.py, line 236, in 
test_FieldEnumeration
self.test_indexDocument()
  File /root/pylucene-4.6.1-1/test/test_PyLucene.py, line 84, in 
test_indexDocument
self.closeStore(store, writer)
  File test/test_PythonDirectory.py, line 255, in closeStore
for arg in args:
  File test/test_PythonDirectory.py, line 255, in closeStore
for arg in args:
  File /usr/lib/python2.7/bdb.py, line 48, in trace_dispatch
return self.dispatch_line(frame)
  File /usr/lib/python2.7/bdb.py, line 67, in dispatch_line
if self.quitting: raise BdbQuit
BdbQuit

==
ERROR: test_IncrementalLoop (__main__.PythonDirectoryTests)
--
Traceback (most recent call last):
  File test/test_PythonDirectory.py, line 268, in test_IncrementalLoop
self.test_indexDocument()
  File /root/pylucene-4.6.1-1/test/test_PyLucene.py, line 84, in 
test_indexDocument
self.closeStore(store, writer)
  File test/test_PythonDirectory.py, line 255, in closeStore
for arg in args:
  File test/test_PythonDirectory.py, line 255, in closeStore
for arg in args:
  File /usr/lib/python2.7/bdb.py, line 48, in trace_dispatch
return self.dispatch_line(frame)
  File /usr/lib/python2.7/bdb.py, line 67, in dispatch_line
if self.quitting: raise BdbQuit
BdbQuit

==
ERROR: test_getFieldInfos (__main__.PythonDirectoryTests)
--
Traceback (most recent call last):
  File /root/pylucene-4.6.1-1/test/test_PyLucene.py, line 282, in 
test_getFieldInfos
self.test_indexDocument()
  File /root/pylucene-4.6.1-1/test/test_PyLucene.py, line 84, in 
test_indexDocument
self.closeStore(store, writer)
  File test/test_PythonDirectory.py, line 255, in closeStore
for arg in args:
  File test/test_PythonDirectory.py, line 255, in closeStore
for arg in args:
  File /usr/lib/python2.7/bdb.py, line 48, in trace_dispatch
return self.dispatch_line(frame)
  File /usr/lib/python2.7/bdb.py, line 67, in dispatch_line
if self.quitting: raise BdbQuit
BdbQuit

==
ERROR: test_indexDocument (__main__.PythonDirectoryTests)
--
Traceback (most recent call last):
  File /root/pylucene-4.6.1-1/test/test_PyLucene.py, line 84, in 
test_indexDocument
self.closeStore(store, writer)
  File test/test_PythonDirectory.py, line 255, in closeStore
for arg in args:
  File test/test_PythonDirectory.py, line 255, in closeStore
for arg in args:
  File /usr/lib/python2.7/bdb.py, line 48, in trace_dispatch
return self.dispatch_line(frame)
  File /usr/lib/python2.7/bdb.py, line 67, in dispatch_line
if self.quitting: raise BdbQuit
BdbQuit

==
ERROR: test_indexDocumentWithText (__main__.PythonDirectoryTests)
--
Traceback (most recent call last):
  File /root/pylucene-4.6.1-1/test/test_PyLucene.py, line 112, in 
test_indexDocumentWithText
self.closeStore(store, writer)
  File test/test_PythonDirectory.py, line 255, in closeStore
for arg in args:
  File test/test_PythonDirectory.py, line 255, in closeStore
for arg in args:
  File /usr/lib/python2.7/bdb.py, line 48, in trace_dispatch
return self.dispatch_line(frame)
  File /usr/lib/python2.7/bdb.py, line 67, in dispatch_line
if self.quitting: raise BdbQuit
BdbQuit

==
ERROR: test_indexDocumentWithUnicodeText (__main__.PythonDirectoryTests)
--
Traceback (most recent call last):
  File /root/pylucene-4.6.1-1/test/test_PyLucene.py, line 143, in 
test_indexDocumentWithUnicodeText
self.closeStore(store, writer)
  File test/test_PythonDirectory.py, line 255, in closeStore
for arg in args:
  File test/test_PythonDirectory.py, line 255, in closeStore
for arg

Re: ImportError: cannot import name Library, during installing PyLucene

2013-10-12 Thread SangHee Kim
Hi Andi,

I have tested building and installing pylucene 4.5 with setuptools 1.1.6
and it works. Thanks!

a. Code of pylucene I used :
http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_4_5/
b. Setuptools version : setuptools-1.1.6-py2.7.egg


On Fri, Oct 11, 2013 at 3:15 PM, Andi Vajda va...@apache.org wrote:


 On Fri, 11 Oct 2013, SangHee Kim wrote:

  Hi everyone!

 I have spent 5 hours to fix this problem but I can't. During installing
 PyLucene 
 withhttp://lucene.apache.org/**pylucene/install.htmthttp://lucene.apache.org/pylucene/install.htmt,
  I faced with
 a error like follwing.

 sanghee-m:jcc sanghee$ python setup.py build
 found JAVAFRAMEWORKS =
 /System/Library/Frameworks/**JavaVM.frameworkTraceback (most recent call

 last):
  File setup.py, line 398, in module
main('--debug' in sys.argv)
  File setup.py, line 306, in main
from setuptools import LibraryImportError: cannot import name Library


 Indeed, there are two problems with setuptools 1.1.6, apparently:
   1. the Library class is only accessible via setuptools.extension
   2. the logic in setuptools.command.build_ext patching in darwin-specific
  options for building a shared library into _CONFIG_VARS is broken

 I added code to JCC's setup.py to workaround both issues.
 This is checked into rev 1531420 in pylucene's trunk.

 Please, refresh your copy of JCC from pylucene's trunk (still called
 2.17), rebuild and reinstall it and try your pylucene 4.4.0 build again.
 Please, let me know if this solves the problem for you as well.

 Andi..




-- 
SangHee Kim
http://goo.gl/LnpDX


Re: ImportError: cannot import name Library, during installing PyLucene

2013-10-12 Thread SangHee Kim
Hi Andi,

Thanks! I summarized the steps at the follwing link.

https://medium.com/small-talk/e1e90a2b129f

I think anybody may need to mention about the point to PyLucene installtion
guide to avoid my case.

http://lucene.apache.org/pylucene/install.html


On Sat, Oct 12, 2013 at 11:22 PM, Andi Vajda va...@apache.org wrote:


  On Oct 12, 2013, at 17:42, SangHee Kim sangheest...@gmail.com wrote:
 
  Hi Andi,
 
  I have tested building and installing pylucene 4.5 with setuptools 1.1.6
 and it works. Thanks!

 Cool, thank you for verifying the fix.

 Andi..

 
  a. Code of pylucene I used :
 http://svn.apache.org/viewvc/lucene/pylucene/branches/pylucene_4_5/
  b. Setuptools version : setuptools-1.1.6-py2.7.egg
 
 
  On Fri, Oct 11, 2013 at 3:15 PM, Andi Vajda va...@apache.org wrote:
 
  On Fri, 11 Oct 2013, SangHee Kim wrote:
 
  Hi everyone!
 
  I have spent 5 hours to fix this problem but I can't. During installing
  PyLucene withhttp://lucene.apache.org/pylucene/install.htmt , I faced
 with
  a error like follwing.
 
  sanghee-m:jcc sanghee$ python setup.py build
  found JAVAFRAMEWORKS =
  /System/Library/Frameworks/JavaVM.frameworkTraceback (most recent call
 
  last):
   File setup.py, line 398, in module
 main('--debug' in sys.argv)
   File setup.py, line 306, in main
 from setuptools import LibraryImportError: cannot import name
 Library
 
  Indeed, there are two problems with setuptools 1.1.6, apparently:
1. the Library class is only accessible via setuptools.extension
2. the logic in setuptools.command.build_ext patching in
 darwin-specific
   options for building a shared library into _CONFIG_VARS is broken
 
  I added code to JCC's setup.py to workaround both issues.
  This is checked into rev 1531420 in pylucene's trunk.
 
  Please, refresh your copy of JCC from pylucene's trunk (still called
 2.17), rebuild and reinstall it and try your pylucene 4.4.0 build again.
  Please, let me know if this solves the problem for you as well.
 
  Andi..
 
 
 
  --
  SangHee Kim
  http://goo.gl/LnpDX




-- 
SangHee Kim
http://goo.gl/LnpDX


ImportError: cannot import name Library, during installing PyLucene

2013-10-11 Thread SangHee Kim
Hi everyone!

I have spent 5 hours to fix this problem but I can't. During installing
PyLucene withhttp://lucene.apache.org/pylucene/install.htmt , I faced with
a error like follwing.

sanghee-m:jcc sanghee$ python setup.py build
found JAVAFRAMEWORKS =
/System/Library/Frameworks/JavaVM.frameworkTraceback (most recent call
last):
  File setup.py, line 398, in module
main('--debug' in sys.argv)
  File setup.py, line 306, in main
from setuptools import LibraryImportError: cannot import name Library
sanghee-m:jcc sanghee$ python setup.py build --debug
found JAVAFRAMEWORKS =
/System/Library/Frameworks/JavaVM.frameworkTraceback (most recent call
last):
  File setup.py, line 398, in module
main('--debug' in sys.argv)
  File setup.py, line 306, in main
from setuptools import LibraryImportError: cannot import name Library
sanghee-m:jcc sanghee$

I can't find Library also. How can I solve this problme? Can you let me
know where should I check when I get this kind of error?

I uses setuptools 1.1.6 and pylucene-4.4.0-1.

-- 
SangHee Kim
http://goo.gl/LnpDX


Re: ImportError: cannot import name Library, during installing PyLucene

2013-10-11 Thread Andi Vajda


On Fri, 11 Oct 2013, SangHee Kim wrote:


Hi everyone!

I have spent 5 hours to fix this problem but I can't. During installing
PyLucene withhttp://lucene.apache.org/pylucene/install.htmt , I faced with
a error like follwing.

sanghee-m:jcc sanghee$ python setup.py build
found JAVAFRAMEWORKS =
/System/Library/Frameworks/JavaVM.frameworkTraceback (most recent call
last):
 File setup.py, line 398, in module
   main('--debug' in sys.argv)
 File setup.py, line 306, in main
   from setuptools import LibraryImportError: cannot import name Library


Indeed, there are two problems with setuptools 1.1.6, apparently:
  1. the Library class is only accessible via setuptools.extension
  2. the logic in setuptools.command.build_ext patching in darwin-specific
 options for building a shared library into _CONFIG_VARS is broken

I added code to JCC's setup.py to workaround both issues.
This is checked into rev 1531420 in pylucene's trunk.

Please, refresh your copy of JCC from pylucene's trunk (still called 2.17), 
rebuild and reinstall it and try your pylucene 4.4.0 build again.

Please, let me know if this solves the problem for you as well.

Andi..


RE: Trouble installing pyLucene on FreeBSD

2010-10-20 Thread Gav...


 -Original Message-
 From: Andi Vajda [mailto:va...@apache.org]
 Sent: Saturday, 9 October 2010 11:32 AM
 To: pylucene-dev@lucene.apache.org
 Subject: Re: Trouble installing pyLucene on FreeBSD
 
 
 On Oct 8, 2010, at 18:20, Gav... ga...@16degrees.com.au wrote:
 
 
 
  -Original Message-
  From: Andi Vajda [mailto:va...@apache.org]
  Sent: Saturday, 9 October 2010 11:04 AM
  To: pylucene-dev@lucene.apache.org
  Subject: Re: Trouble installing pyLucene on FreeBSD
 
 
  On Oct 8, 2010, at 17:37, Gav... ga...@16degrees.com.au wrote:
 
  Hi,
 
  Using FreeBSD 8.1-RC2 Im having trouble installing.
 
  I first tried to install using the ports system and
  /usr/ports/textproc/py-lucene
 
  When that failed I installed from source, compiled jcc and then
  pylucene,
  after some
  fiddling of source to s/freebsd7/freebsd8/g I ended up at the same
  failure
  as when
  installing using the port.
 
  Using Python 2.6 and Ant 1.7, heres the error:
 
  What version of java are you using ?
  Whose JDK ?
 
  Hi Andi,
 
  Seems to be 2 versions on there.
 
  the default;
 
  [gmcdon...@tyr ~]$ java -version
  java version 1.6.0_03-p4
  Java(TM) SE Runtime Environment (build
  1.6.0_03-p4-root_07_sep_2010_08_40-b00)
  Java HotSpot(TM) 64-Bit Server VM (build
  1.6.0_03-p4-root_07_sep_2010_08_40-b00, mixed mode)
 
  Which could be the openjdk version
 
  and there is also the sun version:
 
  [gmcdon...@tyr ~]$ /usr/local/diablo-jdk1.6.0/jre/bin/java -version
  java version 1.6.0_07
  Diablo Java(TM) SE Runtime Environment (build 1.6.0_07-b02)
  Diablo Java HotSpot(TM) 64-Bit Server VM (build 10.0-b23, mixed mode)
 
  during the source install, I pointed it to the /usr/local/diablo-
  jdk1.6.0
  (sun) version.
 
 Be sure to not mix java installs. Be sure to use the header files and
 libs (when building jcc) that correspond to the java binaries you
 intend to use.
 
 I don't have a freebsd setup, so no experience on that plarform. I
 know that there are a few freebsd users who may read this list. Let's
 hope they chime in.
 
 Andi..

Well , seems not.

I am trying to set up a reviewboard instance here at the ASF for projects to
use.

don't suppose that might makes a difference to want to help your always
helpful 
sysadmin ?

Gav...

 
 
 
  Thanks
 
  Gav...
 
 
 
  Andi..
 
 
 
  /usr/local/bin/python -m jcc.__main__ --jar
  lucene-java-3.0.2/build/lucene-core-3.0.2.jar --jar
  lucene-java-3.0.2/build/contrib/snowball/lucene-snowball-3.0.2.jar
  --
  jar
  lucene-java-3.0.2/build/contrib/analyzers/common/lucene-
  analyzers-3.0.2.jar
  --jar lucene-java-3.0.2/build/contrib/regex/lucene-regex-3.0.2.jar
  --
  jar
  lucene-java-3.0.2/build/contrib/memory/lucene-memory-3.0.2.jar --
 jar
  lucene-java-3.0.2/build/contrib/highlighter/lucene-
  highlighter-3.0.2.jar
  --jar lucene-java-3.0.2/build/contrib/queries/lucene-
  queries-3.0.2.jar --jar
  build/jar/extensions.jar  --package java.lang java.lang.System
  java.lang.Runtime --package java.util java.util.Arrays
  java.text.SimpleDateFormat java.text.DecimalFormat
  java.text.Collator
  --package java.io java.io.StringReader java.io.InputStreamReader
  java.io.FileInputStream --exclude
  org.apache.lucene.queryParser.Token
  --exclude org.apache.lucene.queryParser.TokenMgrError --exclude
  org.apache.lucene.queryParser.QueryParserTokenManager --exclude
  org.apache.lucene.queryParser.ParseException --exclude
  org.apache.lucene.search.regex.JakartaRegexpCapabilities --exclude
  org.apache.regexp.RegexpTunnel --python lucene --mapping
  org.apache.lucene.document.Document
  'get:(Ljava/lang/String;)Ljava/lang/String;' --mapping
  java.util.Properties
  'getProperty:(Ljava/lang/String;)Ljava/lang/String;' --rename
  org.apache.lucene.search.highlight.SpanScorer=HighlighterSpanScorer
  --version 3.0.2 --module python/collections.py --files 2 --build
  Exception in thread main java.lang.NoSuchMethodException:
  java.lang.Object.compareTo(java.lang.Object)
at java.lang.Class.getMethod(Class.java:1605)
  Traceback (most recent call last):
  File /usr/local/lib/python2.6/runpy.py, line 122, in
  _run_module_as_main
__main__, fname, loader, pkg_name)
  File /usr/local/lib/python2.6/runpy.py, line 34, in _run_code
exec code in run_globals
  File
  /usr/local/lib/python2.6/site-packages/JCC-2.6-py2.6-freebsd-8.1-
  RC2-amd64.
  egg/jcc/__main__.py, line 102, in module
cpp.jcc(sys.argv)
  File
  /usr/local/lib/python2.6/site-packages/JCC-2.6-py2.6-freebsd-8.1-
  RC2-amd64.
  egg/jcc/cpp.py, line 565, in jcc
declares, typeset)
  File
  /usr/local/lib/python2.6/site-packages/JCC-2.6-py2.6-freebsd-8.1-
  RC2-amd64.
  egg/jcc/cpp.py, line 1014, in code
superMethod = find_method(superCls, methodName, params)
  File
  /usr/local/lib/python2.6/site-packages/JCC-2.6-py2.6-freebsd-8.1-
  RC2-amd64.
  egg/jcc/cpp.py, line 218, in find_method
if (e.getJavaException().getClass().getName() ==
  'java.lang.NoSuchMethodException'):
  File
  /usr/local

Trouble installing pyLucene on FreeBSD

2010-10-08 Thread Gav...
Hi,

Using FreeBSD 8.1-RC2 Im having trouble installing.

I first tried to install using the ports system and
/usr/ports/textproc/py-lucene

When that failed I installed from source, compiled jcc and then pylucene,
after some
fiddling of source to s/freebsd7/freebsd8/g I ended up at the same failure
as when 
installing using the port.

Using Python 2.6 and Ant 1.7, heres the error:

/usr/local/bin/python -m jcc.__main__ --jar
lucene-java-3.0.2/build/lucene-core-3.0.2.jar --jar
lucene-java-3.0.2/build/contrib/snowball/lucene-snowball-3.0.2.jar --jar
lucene-java-3.0.2/build/contrib/analyzers/common/lucene-analyzers-3.0.2.jar
--jar lucene-java-3.0.2/build/contrib/regex/lucene-regex-3.0.2.jar --jar
lucene-java-3.0.2/build/contrib/memory/lucene-memory-3.0.2.jar --jar
lucene-java-3.0.2/build/contrib/highlighter/lucene-highlighter-3.0.2.jar
--jar lucene-java-3.0.2/build/contrib/queries/lucene-queries-3.0.2.jar --jar
build/jar/extensions.jar  --package java.lang java.lang.System
java.lang.Runtime --package java.util java.util.Arrays
java.text.SimpleDateFormat java.text.DecimalFormat java.text.Collator
--package java.io java.io.StringReader java.io.InputStreamReader
java.io.FileInputStream --exclude org.apache.lucene.queryParser.Token
--exclude org.apache.lucene.queryParser.TokenMgrError --exclude
org.apache.lucene.queryParser.QueryParserTokenManager --exclude
org.apache.lucene.queryParser.ParseException --exclude
org.apache.lucene.search.regex.JakartaRegexpCapabilities --exclude
org.apache.regexp.RegexpTunnel --python lucene --mapping
org.apache.lucene.document.Document
'get:(Ljava/lang/String;)Ljava/lang/String;' --mapping java.util.Properties
'getProperty:(Ljava/lang/String;)Ljava/lang/String;' --rename
org.apache.lucene.search.highlight.SpanScorer=HighlighterSpanScorer
--version 3.0.2 --module python/collections.py --files 2 --build
Exception in thread main java.lang.NoSuchMethodException:
java.lang.Object.compareTo(java.lang.Object)
at java.lang.Class.getMethod(Class.java:1605)
Traceback (most recent call last):
  File /usr/local/lib/python2.6/runpy.py, line 122, in _run_module_as_main
__main__, fname, loader, pkg_name)
  File /usr/local/lib/python2.6/runpy.py, line 34, in _run_code
exec code in run_globals
  File
/usr/local/lib/python2.6/site-packages/JCC-2.6-py2.6-freebsd-8.1-RC2-amd64.
egg/jcc/__main__.py, line 102, in module
cpp.jcc(sys.argv)
  File
/usr/local/lib/python2.6/site-packages/JCC-2.6-py2.6-freebsd-8.1-RC2-amd64.
egg/jcc/cpp.py, line 565, in jcc
declares, typeset)
  File
/usr/local/lib/python2.6/site-packages/JCC-2.6-py2.6-freebsd-8.1-RC2-amd64.
egg/jcc/cpp.py, line 1014, in code
superMethod = find_method(superCls, methodName, params)
  File
/usr/local/lib/python2.6/site-packages/JCC-2.6-py2.6-freebsd-8.1-RC2-amd64.
egg/jcc/cpp.py, line 218, in find_method
if (e.getJavaException().getClass().getName() ==
'java.lang.NoSuchMethodException'):
  File
/usr/local/lib/python2.6/site-packages/JCC-2.6-py2.6-freebsd-8.1-RC2-amd64.
egg/jcc/cpp.py, line 51, in getJavaException
return self.args[0]
IndexError: tuple index out of range
gmake: *** [compile] Error 255

Any ideas please?

Gav...




Re: Trouble installing pyLucene on FreeBSD

2010-10-08 Thread Andi Vajda


On Oct 8, 2010, at 17:37, Gav... ga...@16degrees.com.au wrote:


Hi,

Using FreeBSD 8.1-RC2 Im having trouble installing.

I first tried to install using the ports system and
/usr/ports/textproc/py-lucene

When that failed I installed from source, compiled jcc and then  
pylucene,

after some
fiddling of source to s/freebsd7/freebsd8/g I ended up at the same  
failure

as when
installing using the port.

Using Python 2.6 and Ant 1.7, heres the error:


What version of java are you using ?
Whose JDK ?

Andi..




/usr/local/bin/python -m jcc.__main__ --jar
lucene-java-3.0.2/build/lucene-core-3.0.2.jar --jar
lucene-java-3.0.2/build/contrib/snowball/lucene-snowball-3.0.2.jar -- 
jar
lucene-java-3.0.2/build/contrib/analyzers/common/lucene- 
analyzers-3.0.2.jar
--jar lucene-java-3.0.2/build/contrib/regex/lucene-regex-3.0.2.jar -- 
jar

lucene-java-3.0.2/build/contrib/memory/lucene-memory-3.0.2.jar --jar
lucene-java-3.0.2/build/contrib/highlighter/lucene- 
highlighter-3.0.2.jar
--jar lucene-java-3.0.2/build/contrib/queries/lucene- 
queries-3.0.2.jar --jar

build/jar/extensions.jar  --package java.lang java.lang.System
java.lang.Runtime --package java.util java.util.Arrays
java.text.SimpleDateFormat java.text.DecimalFormat java.text.Collator
--package java.io java.io.StringReader java.io.InputStreamReader
java.io.FileInputStream --exclude org.apache.lucene.queryParser.Token
--exclude org.apache.lucene.queryParser.TokenMgrError --exclude
org.apache.lucene.queryParser.QueryParserTokenManager --exclude
org.apache.lucene.queryParser.ParseException --exclude
org.apache.lucene.search.regex.JakartaRegexpCapabilities --exclude
org.apache.regexp.RegexpTunnel --python lucene --mapping
org.apache.lucene.document.Document
'get:(Ljava/lang/String;)Ljava/lang/String;' --mapping  
java.util.Properties

'getProperty:(Ljava/lang/String;)Ljava/lang/String;' --rename
org.apache.lucene.search.highlight.SpanScorer=HighlighterSpanScorer
--version 3.0.2 --module python/collections.py --files 2 --build
Exception in thread main java.lang.NoSuchMethodException:
java.lang.Object.compareTo(java.lang.Object)
   at java.lang.Class.getMethod(Class.java:1605)
Traceback (most recent call last):
 File /usr/local/lib/python2.6/runpy.py, line 122, in  
_run_module_as_main

   __main__, fname, loader, pkg_name)
 File /usr/local/lib/python2.6/runpy.py, line 34, in _run_code
   exec code in run_globals
 File
/usr/local/lib/python2.6/site-packages/JCC-2.6-py2.6-freebsd-8.1- 
RC2-amd64.

egg/jcc/__main__.py, line 102, in module
   cpp.jcc(sys.argv)
 File
/usr/local/lib/python2.6/site-packages/JCC-2.6-py2.6-freebsd-8.1- 
RC2-amd64.

egg/jcc/cpp.py, line 565, in jcc
   declares, typeset)
 File
/usr/local/lib/python2.6/site-packages/JCC-2.6-py2.6-freebsd-8.1- 
RC2-amd64.

egg/jcc/cpp.py, line 1014, in code
   superMethod = find_method(superCls, methodName, params)
 File
/usr/local/lib/python2.6/site-packages/JCC-2.6-py2.6-freebsd-8.1- 
RC2-amd64.

egg/jcc/cpp.py, line 218, in find_method
   if (e.getJavaException().getClass().getName() ==
'java.lang.NoSuchMethodException'):
 File
/usr/local/lib/python2.6/site-packages/JCC-2.6-py2.6-freebsd-8.1- 
RC2-amd64.

egg/jcc/cpp.py, line 51, in getJavaException
   return self.args[0]
IndexError: tuple index out of range
gmake: *** [compile] Error 255

Any ideas please?

Gav...



Re: Trouble installing pyLucene on FreeBSD

2010-10-08 Thread Andi Vajda


On Oct 8, 2010, at 18:20, Gav... ga...@16degrees.com.au wrote:





-Original Message-
From: Andi Vajda [mailto:va...@apache.org]
Sent: Saturday, 9 October 2010 11:04 AM
To: pylucene-dev@lucene.apache.org
Subject: Re: Trouble installing pyLucene on FreeBSD


On Oct 8, 2010, at 17:37, Gav... ga...@16degrees.com.au wrote:


Hi,

Using FreeBSD 8.1-RC2 Im having trouble installing.

I first tried to install using the ports system and
/usr/ports/textproc/py-lucene

When that failed I installed from source, compiled jcc and then
pylucene,
after some
fiddling of source to s/freebsd7/freebsd8/g I ended up at the same
failure
as when
installing using the port.

Using Python 2.6 and Ant 1.7, heres the error:


What version of java are you using ?
Whose JDK ?


Hi Andi,

Seems to be 2 versions on there.

the default;

[gmcdon...@tyr ~]$ java -version
java version 1.6.0_03-p4
Java(TM) SE Runtime Environment (build
1.6.0_03-p4-root_07_sep_2010_08_40-b00)
Java HotSpot(TM) 64-Bit Server VM (build
1.6.0_03-p4-root_07_sep_2010_08_40-b00, mixed mode)

Which could be the openjdk version

and there is also the sun version:

[gmcdon...@tyr ~]$ /usr/local/diablo-jdk1.6.0/jre/bin/java -version
java version 1.6.0_07
Diablo Java(TM) SE Runtime Environment (build 1.6.0_07-b02)
Diablo Java HotSpot(TM) 64-Bit Server VM (build 10.0-b23, mixed mode)

during the source install, I pointed it to the /usr/local/diablo- 
jdk1.6.0

(sun) version.


Be sure to not mix java installs. Be sure to use the header files and  
libs (when building jcc) that correspond to the java binaries you  
intend to use.


I don't have a freebsd setup, so no experience on that plarform. I  
know that there are a few freebsd users who may read this list. Let's  
hope they chime in.


Andi..




Thanks

Gav...




Andi..




/usr/local/bin/python -m jcc.__main__ --jar
lucene-java-3.0.2/build/lucene-core-3.0.2.jar --jar
lucene-java-3.0.2/build/contrib/snowball/lucene-snowball-3.0.2.jar  
--

jar
lucene-java-3.0.2/build/contrib/analyzers/common/lucene-
analyzers-3.0.2.jar
--jar lucene-java-3.0.2/build/contrib/regex/lucene-regex-3.0.2.jar  
--

jar
lucene-java-3.0.2/build/contrib/memory/lucene-memory-3.0.2.jar --jar
lucene-java-3.0.2/build/contrib/highlighter/lucene-
highlighter-3.0.2.jar
--jar lucene-java-3.0.2/build/contrib/queries/lucene-
queries-3.0.2.jar --jar
build/jar/extensions.jar  --package java.lang java.lang.System
java.lang.Runtime --package java.util java.util.Arrays
java.text.SimpleDateFormat java.text.DecimalFormat  
java.text.Collator

--package java.io java.io.StringReader java.io.InputStreamReader
java.io.FileInputStream --exclude  
org.apache.lucene.queryParser.Token

--exclude org.apache.lucene.queryParser.TokenMgrError --exclude
org.apache.lucene.queryParser.QueryParserTokenManager --exclude
org.apache.lucene.queryParser.ParseException --exclude
org.apache.lucene.search.regex.JakartaRegexpCapabilities --exclude
org.apache.regexp.RegexpTunnel --python lucene --mapping
org.apache.lucene.document.Document
'get:(Ljava/lang/String;)Ljava/lang/String;' --mapping
java.util.Properties
'getProperty:(Ljava/lang/String;)Ljava/lang/String;' --rename
org.apache.lucene.search.highlight.SpanScorer=HighlighterSpanScorer
--version 3.0.2 --module python/collections.py --files 2 --build
Exception in thread main java.lang.NoSuchMethodException:
java.lang.Object.compareTo(java.lang.Object)
  at java.lang.Class.getMethod(Class.java:1605)
Traceback (most recent call last):
File /usr/local/lib/python2.6/runpy.py, line 122, in
_run_module_as_main
  __main__, fname, loader, pkg_name)
File /usr/local/lib/python2.6/runpy.py, line 34, in _run_code
  exec code in run_globals
File
/usr/local/lib/python2.6/site-packages/JCC-2.6-py2.6-freebsd-8.1-
RC2-amd64.
egg/jcc/__main__.py, line 102, in module
  cpp.jcc(sys.argv)
File
/usr/local/lib/python2.6/site-packages/JCC-2.6-py2.6-freebsd-8.1-
RC2-amd64.
egg/jcc/cpp.py, line 565, in jcc
  declares, typeset)
File
/usr/local/lib/python2.6/site-packages/JCC-2.6-py2.6-freebsd-8.1-
RC2-amd64.
egg/jcc/cpp.py, line 1014, in code
  superMethod = find_method(superCls, methodName, params)
File
/usr/local/lib/python2.6/site-packages/JCC-2.6-py2.6-freebsd-8.1-
RC2-amd64.
egg/jcc/cpp.py, line 218, in find_method
  if (e.getJavaException().getClass().getName() ==
'java.lang.NoSuchMethodException'):
File
/usr/local/lib/python2.6/site-packages/JCC-2.6-py2.6-freebsd-8.1-
RC2-amd64.
egg/jcc/cpp.py, line 51, in getJavaException
  return self.args[0]
IndexError: tuple index out of range
gmake: *** [compile] Error 255

Any ideas please?

Gav...





Re: installing pylucene-2.4.1

2009-04-23 Thread Andi Vajda


On Thu, 23 Apr 2009, Bill Janssen wrote:


I've just tried installing 2.4.1, and I've got a few suggestions for
packaging.

1. Put a plain-text version of readme.html in README, automatically
  generated from readme.html (or whatever), as part of the src-dist
  build process.  I always hate it when I visit a README, and it says,
  You fool!  You should be looking at doc/documentation/readme.html!


He, he. I didn't put you fool in there. Maybe I should add that :) ?

If Apache Forrest, which is used to produce the web site, can be used to 
generate plain text, then this should be used for sure. What I don't want 
to do is maintain two versions of the docs, even one pagers.



2. Ditto for the INSTALL file.

3. Oh, and by the way, looking at readme.html is tough.  The string
  doc/documentation/readme.html will almost always be read as just
  documentation/readme.html.  I'd suggest calling that directory
  doc/dist, or some such, instead of doc/documentation.

4.  If there's a top-level build.xml file, lots of users (me, too :-)
   will think that they can just type ant to build the package.  That
   should either just work, or you should rename the build.xml file
   to something less obvious, like to-be-invoked-by-the-Makefile.xml.


Renaming build.xml to something more obscure could be done.
Would you like to send in a patch ?


5.  Get rid of editing the Makefile, if you can.  Would you like me to
   write an autoconf script for this?


Sadly, the alternative here is autoconf. If you'd like to write an autoconf 
script that works for all the variants of Python/Java/OS currently supported 
in the Makefile, that would be excellent.


Unless you're on Mac, editing JCC's setup.py is also required. If you write 
an autoconf script for PyLucene, be sure to also include the generation of 
JCC's setup.py, otherwise you've only addressed half of the problem.


I expect that cracking the nut of finding the JDK on each and every Linux 
distro is going to present a challenge. Providing command line arguments to 
override what configure finds is probably a must.


Thanks !

Andi..