Sunday, March 9, 2014

Twisted on Python 3 now pip installable

The subset of Twisted that has been ported to Python 3 can now be pip installed. By either pointing at a version control URL or requiring Twisted 14.0 (once it's released), you can now have Twisted as a dependency for your Python 3 packages.

Here's a slightly edited version of my Travis-CI config for Crochet, demonstrating how I run unit tests on both Python 2 and Python 3 versions of Twisted (slightly tricky because the trial test runner hasn't been ported yet):

language: python

  - TWISTED=Twisted==13.0 RUNTESTS=trial
  - TWISTED=Twisted==13.1 RUNTESTS=trial
  - TWISTED=Twisted==13.2 RUNTESTS=trial

  - 2.6
  - 2.7
  - pypy

    - python: 3.3
      env: TWISTED=git+ RUNTESTS="python -m unittest discover"

  - pip install -q --no-use-wheel $TWISTED --use-mirrors
  - python -q install

script: $RUNTESTS crochet.tests

No comments:

Post a Comment