Opened 8 years ago

Closed 8 years ago

#3410 enhancement closed fixed (fixed)

Exclude extensions for Jython

Reported by: Thijs Triemstra Owned by:
Priority: normal Milestone:
Component: core Keywords: jython
Cc: Thijs Triemstra Branch: branches/jython-ext-3410
branch-diff, diff-cov, branch-cov, buildbot
Author: thijs

Description

When trying to build Twisted for Jython it dies with:

$ jython setup.py install
running install
running build
running build_py
copying twisted/protocols/dns.py -> build/lib.java1.6.0_05-2.3/twisted/protocols
copying twisted/protocols/ethernet.py -> build/lib.java1.6.0_05-2.3/twisted/protocols
copying twisted/protocols/imap4.py -> build/lib.java1.6.0_05-2.3/twisted/protocols
copying twisted/protocols/ip.py -> build/lib.java1.6.0_05-2.3/twisted/protocols
copying twisted/protocols/irc.py -> build/lib.java1.6.0_05-2.3/twisted/protocols
copying twisted/protocols/jabber.py -> build/lib.java1.6.0_05-2.3/twisted/protocols
copying twisted/protocols/msn.py -> build/lib.java1.6.0_05-2.3/twisted/protocols
copying twisted/protocols/nntp.py -> build/lib.java1.6.0_05-2.3/twisted/protocols
copying twisted/protocols/oscar.py -> build/lib.java1.6.0_05-2.3/twisted/protocols
copying twisted/protocols/pop3.py -> build/lib.java1.6.0_05-2.3/twisted/protocols
copying twisted/protocols/raw.py -> build/lib.java1.6.0_05-2.3/twisted/protocols
copying twisted/protocols/rawudp.py -> build/lib.java1.6.0_05-2.3/twisted/protocols
copying twisted/protocols/smtp.py -> build/lib.java1.6.0_05-2.3/twisted/protocols
copying twisted/protocols/sux.py -> build/lib.java1.6.0_05-2.3/twisted/protocols
copying twisted/protocols/toc.py -> build/lib.java1.6.0_05-2.3/twisted/protocols
copying twisted/web/xmlrpc.py -> build/lib.java1.6.0_05-2.3/twisted/web
copying twisted/web/test/test_xmlrpc.py -> build/lib.java1.6.0_05-2.3/twisted/web/test
running build_ext
error: Compiling extensions is not supported on Jython

jbaker suggested to use something like:

if not sys.platform.startswith('java'):
    # ...

Change History (8)

comment:1 Changed 8 years ago by Thijs Triemstra

The command for the Jython buildslave also needs to change and exclude the extension build process.

comment:2 Changed 8 years ago by Thijs Triemstra

Keywords: jython added

comment:3 in reply to:  1 Changed 8 years ago by Thijs Triemstra

Replying to thijs:

The command for the Jython buildslave also needs to change and exclude the extension build process.

Cause it currently dies with http://buildbot.twistedmatrix.com/builders/ubuntu64-jython2.5-select/builds/5/steps/compile/logs/stdio/text

comment:4 Changed 8 years ago by Thijs Triemstra

author: thijs
Branch: branches/jython-ext-3410

(In [24687]) Branching to 'jython-ext-3410'

comment:5 in reply to:  1 Changed 8 years ago by Thijs Triemstra

Keywords: review added
Owner: Glyph deleted

Replying to thijs:

The command for the Jython buildslave also needs to change and exclude the extension build process.

I'll open a new ticket for this as suggested by exarkun.

I committed a fix in r24688, and the buildslave now shows the expected output:

running build_ext

Putting it up for review.

comment:6 Changed 8 years ago by Jean-Paul Calderone

Keywords: review removed
Owner: set to Thijs Triemstra

I had some ideas for doing this check in twisted/python/dist.py where it could be unit tested. However, it seems that ConditionalExtension, the thing I was hoping we would be able to use, does not actually work unless you can run build_ext. As it seems Jython can't do this, I suppose there's no obvious way to use twisted/python/dist.py to do this.

So, please merge.

comment:7 Changed 8 years ago by Thijs Triemstra

Resolution: fixed
Status: newclosed

(In [24692]) Merge jython-ext-3410: exclude extensions in the build process when using Jython

Author: thijs Reviewer: exarkun Fixes: #3410

comment:8 Changed 6 years ago by <automation>

Owner: Thijs Triemstra deleted
Note: See TracTickets for help on using tickets.