You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pylucene-dev@lucene.apache.org by Caleb Burns <cp...@gmail.com> on 2012/10/01 06:35:07 UTC

JCC linux patch

Hi,

The current method to build JCC on Linux requires patching the setuptools
package. Would you be interested in a patch to JCC that monkey-patches the
setuptools Library and Extension classes to avoid the manual patch. It
works with setuptools-0.6c7-11 and distribute-0.6.1+ without the need of
manually patching setuptools. If this is not the proper place to propose a
fix, please let me know.

Thanks,
Caleb Burns

Re: JCC linux patch

Posted by Caleb Burns <cp...@gmail.com>.
Hi Andi,

On Sun, Oct 7, 2012 at 9:08 PM, Andi Vajda <va...@apache.org> wrote:
>
>  Hi Caleb,
>
> On Tue, 2 Oct 2012, Caleb Burns wrote:
>
> I took a look at your patch. A couple of questions:
>
> - In jcc/helpers/linux.py, you seem to be getting rid of the 0.6.15
>   setuptools case. How is that version handled now ?
>   I remember adding this case last May since it's a version out there in the
>   wild and patching it failed as it needs the 0.6c7 patch.
>   Am I reading this correctly that you're assuming 0.6.15 to be compatible
>   with 0.6.1 distribute ?

The 0.6.15 setuptools (specifically 0.6.15-1ubuntu1) was the version
installed by Ubuntu which installs distribute-0.6.15. I changed the
0.6.15 down to 0.6.1 because I tested distribute-0.6.1, 0.6.15, 0.6.28
and they all worked with JCC when applying the 0.6c7 patch.

> - You have a line of new code in linux.py that says:
>   +            if build_ext.use_stubs or os.name == 'nt':
>   How can os.name be 'nt' when linux.py is being run ?

The `os.name == 'nt'` line was an oversight. I copied the relevant
code from setuptools that the 0.6c7 and 11 patches touched, merged the
patches, and incorporated the new code into jcc/helpers/linux.py. That
line should just be:

+            if build_ext.use_stubs:

Caleb Burns

Re: JCC linux patch

Posted by Andi Vajda <va...@apache.org>.
  Hi Caleb,

On Tue, 2 Oct 2012, Caleb Burns wrote:

> On Tue, Oct 2, 2012 at 1:04 AM, Andi Vajda <va...@apache.org> wrote:
>>
>> Great. Now, in order to get the patch to me, you need to either:
>>   - open a bug in JIRA and attach it there (PYLUCENE project)
>>   - or send it to me directly
>
> I opened a bug on JIRA for PyLucene and added the patch:
> https://issues.apache.org/jira/browse/PYLUCENE-24
>
>> If you send patches to the list, they get eaten by the list processor.
>> Sorry.
>
> I didn't realize attachments were filtered.

I took a look at your patch. A couple of questions:

- In jcc/helpers/linux.py, you seem to be getting rid of the 0.6.15
   setuptools case. How is that version handled now ?
   I remember adding this case last May since it's a version out there in the
   wild and patching it failed as it needs the 0.6c7 patch.
   Am I reading this correctly that you're assuming 0.6.15 to be compatible
   with 0.6.1 distribute ?

- You have a line of new code in linux.py that says:
   +            if build_ext.use_stubs or os.name == 'nt':
   How can os.name be 'nt' when linux.py is being run ?

Andi..

Re: JCC linux patch

Posted by Caleb Burns <cp...@gmail.com>.
On Tue, Oct 2, 2012 at 1:04 AM, Andi Vajda <va...@apache.org> wrote:
>
> Great. Now, in order to get the patch to me, you need to either:
>   - open a bug in JIRA and attach it there (PYLUCENE project)
>   - or send it to me directly

I opened a bug on JIRA for PyLucene and added the patch:
https://issues.apache.org/jira/browse/PYLUCENE-24

> If you send patches to the list, they get eaten by the list processor.
> Sorry.

I didn't realize attachments were filtered.

Thanks,

Caleb Burns

>
> Thanks !
>
> Andi..

Re: JCC linux patch

Posted by Andi Vajda <va...@apache.org>.
On Tue, 2 Oct 2012, Caleb Burns wrote:

> On Mon, Oct 1, 2012 at 7:46 PM, Andi Vajda <va...@apache.org> wrote:
>>
>> On Oct 1, 2012, at 16:37, Caleb Burns <cp...@gmail.com> wrote:
>>
>> I mean, on particular, all the setuptools versions out there.
>>
>> Andi..
>
> I added a condition for supported versions of the monkey patch while
> leaving the previous conditions to display the info for manual
> patching. Let me know if it's not right.

Great. Now, in order to get the patch to me, you need to either:
   - open a bug in JIRA and attach it there (PYLUCENE project)
   - or send it to me directly

If you send patches to the list, they get eaten by the list processor.
Sorry.

Thanks !

Andi..

Re: JCC linux patch

Posted by Caleb Burns <cp...@gmail.com>.
On Mon, Oct 1, 2012 at 7:46 PM, Andi Vajda <va...@apache.org> wrote:
>
> On Oct 1, 2012, at 16:37, Caleb Burns <cp...@gmail.com> wrote:
>
> I mean, on particular, all the setuptools versions out there.
>
> Andi..

I added a condition for supported versions of the monkey patch while
leaving the previous conditions to display the info for manual
patching. Let me know if it's not right.

Caleb Burns

Re: JCC linux patch

Posted by Andi Vajda <va...@apache.org>.
On Oct 1, 2012, at 16:37, Caleb Burns <cp...@gmail.com> wrote:

> On Mon, Oct 1, 2012 at 12:55 AM, Andi Vajda <va...@apache.org> wrote:
> 
>> That would be great !
>> Could you please make your monkey patch detect the version of
>> setuptools/distribute used and issue the same the same error message as is
>> currently emitted by the JCC linux setup.py code when the version is not
>> supported by your monkey patch, ie, when manual patching is still needed.
>> Thanks !
>> 
>> Andi.,
> 
> Right now I'm assuming that future versions of distribute will be
> supported because 0.6.1 through 0.6.28 (the latest in pypi) all work.
> Do you mean issue the same error for any version newer than 0.6.28?

I mean, on particular, all the setuptools versions out there.

Andi..

> 
> Thanks,
> Caleb Burns

Re: JCC linux patch

Posted by Caleb Burns <cp...@gmail.com>.
On Mon, Oct 1, 2012 at 12:55 AM, Andi Vajda <va...@apache.org> wrote:

> That would be great !
> Could you please make your monkey patch detect the version of
> setuptools/distribute used and issue the same the same error message as is
> currently emitted by the JCC linux setup.py code when the version is not
> supported by your monkey patch, ie, when manual patching is still needed.
> Thanks !
>
> Andi.,

Right now I'm assuming that future versions of distribute will be
supported because 0.6.1 through 0.6.28 (the latest in pypi) all work.
Do you mean issue the same error for any version newer than 0.6.28?

Thanks,
Caleb Burns

Re: JCC linux patch

Posted by Andi Vajda <va...@apache.org>.
On Sep 30, 2012, at 21:35, Caleb Burns <cp...@gmail.com> wrote:

> Hi,
> 
> The current method to build JCC on Linux requires patching the setuptools package. Would you be interested in a patch to JCC that monkey-patches the setuptools Library and Extension classes to avoid the manual patch. It works with setuptools-0.6c7-11 and distribute-0.6.1+ without the need of manually patching setuptools. If this is not the proper place to propose a fix, please let me know.

That would be great !
Could you please make your monkey patch detect the version of setuptools/distribute used and issue the same the same error message as is currently emitted by the JCC linux setup.py code when the version is not supported by your monkey patch, ie, when manual patching is still needed.

Thanks !

Andi.,

> 
> Thanks,
> Caleb Burns