Opened 6 years ago

Closed 6 years ago

#3410 enhancement closed fixed (fixed)

Exclude extensions for Jython

Reported by: thijs Owned by:
Priority: normal Milestone:
Component: core Keywords: jython
Cc: thijs Branch: branches/jython-ext-3410
(diff, github, buildbot, log)
Author: thijs Launchpad Bug:

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 follow-ups: Changed 6 years ago by thijs

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

comment:2 Changed 6 years ago by thijs

  • Keywords jython added

comment:3 in reply to: ↑ 1 Changed 6 years ago by thijs

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 6 years ago by thijs

  • author set to thijs
  • Branch set to branches/jython-ext-3410

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

comment:5 in reply to: ↑ 1 Changed 6 years ago by thijs

  • 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 6 years ago by exarkun

  • Keywords review removed
  • Owner set to thijs

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 6 years ago by thijs

  • Resolution set to fixed
  • Status changed from new to closed

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

Author: thijs
Reviewer: exarkun
Fixes: #3410

comment:8 Changed 3 years ago by <automation>

  • Owner thijs deleted
Note: See TracTickets for help on using tickets.