summaryrefslogtreecommitdiff
path: root/doc/install.rst
blob: d67aa59a405762c297054f5b604c73df7ba4c55f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
++++++++++++++++
Install Trollius
++++++++++++++++

.. warning::
   :ref:`The Trollius project is now deprecated! <deprecated>`

Trollius supports Python 2.7, 3.3 and 3.4.

There is an experimental support of Python 3.5. Issues with Python 3.5:

* don't support asyncio coroutines
* ``Task.get_task()`` is broken
* ``repr(Task)`` is broken

Support of Python 2.6 and 3.2 was dropped in Trollius 2.1.


Packages for Linux
==================

* `Debian package
  <https://packages.debian.org/fr/sid/python-trollius>`_
* `ArchLinux package
  <https://aur.archlinux.org/packages/python2-trollius/>`_
* `Fedora and CentOS package: python-trollius
  <http://pkgs.org/download/python-trollius>`_


Install Trollius on Windows using pip
=====================================

Since Trollius 0.2, `precompiled wheel packages <http://pythonwheels.com/>`_
are now distributed on the Python Cheeseshop (PyPI). Procedure to install
Trollius on Windows:

* `Install pip
  <http://www.pip-installer.org/en/latest/installing.html>`_, download
  ``get-pip.py`` and type::

  \Python27\python.exe get-pip.py

* If you already have pip, ensure that you have at least pip 1.4. If you need
  to upgrade::

  \Python27\python.exe -m pip install -U pip

* Install Trollius::

  \Python27\python.exe -m pip install trollius

* pip also installs the ``futures`` dependency

.. note::

   Only wheel packages for Python 2.7, 3.3 and 3.4 are currently distributed on
   the Cheeseshop (PyPI). If you need wheel packages for other Python versions,
   please ask.

Download source code
====================

Command to download the development version of the source code (``trollius``
branch)::

    git clone https://github.com/haypo/trollius.git -b trollius

The actual code lives in the ``trollius`` subdirectory. Tests are in the
``tests`` subdirectory.

See the `trollius project at Github
<https://github.com/haypo/trollius>`_.

The source code of the Trollius project is in the ``trollius`` branch of the
Mercurial repository, not in the default branch. The default branch is the
Tulip project, Trollius repository is a fork of the Tulip repository.


Dependencies
============

Trollius requires the `six <https://pypi.python.org/pypi/six>`_ module.

Python 2.7 requires `futures <https://pypi.python.org/pypi/futures>`_ to get a
backport of ``concurrent.futures``.


Build manually Trollius on Windows
==================================

On Windows, if you cannot use precompiled wheel packages, an extension module
must be compiled: the ``_overlapped`` module (source code: ``overlapped.c``).
Read `Compile Python extensions on Windows
<http://haypo-notes.readthedocs.org/python.html#compile-python-extensions-on-windows>`_
to prepare your environment to build the Python extension. Then build the
extension using::

    C:\Python27\python.exe setup.py build_ext

.. _backports:

Backports
=========

To support old Python versions, many Python modules of the standard library
have been backported:

========================  =========  =======================
Name                      Python     Backport
========================  =========  =======================
OSError                        3.3   asyncio.py33_exceptions
_overlapped                    3.4   asyncio._overlapped
_winapi                        3.3   asyncio.py33_winapi
collections.OrderedDict   2.7, 3.1   ordereddict (PyPI)
concurrent.futures             3.2   futures (PyPI)
selectors                      3.4   asyncio.selectors
ssl                       3.2, 3.3   asyncio.py3_ssl
time.monotonic                 3.3   asyncio.time_monotonic
unittest                  2.7, 3.1   unittest2 (PyPI)
unittest.mock                  3.3   mock (PyPI)
weakref.WeakSet           2.7, 3.0   asyncio.py27_weakrefset
========================  =========  =======================