Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Commit

Permalink
Merge pull request #265 from dhermes/add-pypy-note-to-contributing
Browse files Browse the repository at this point in the history
Update docs and CONTRIBUTING file with pypy tips.
  • Loading branch information
nathanielmanistaatgoogle committed Aug 14, 2015
2 parents dd0f891 + 3dd02c6 commit 2e4cceb
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 6 deletions.
5 changes: 5 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ Running Tests
$ tox
```

- In order to run the `pypy` environment (in `tox`) you'll need at
least version 2.6 of `pypy` installed. See the [docs][13] for
more information.
Running System Tests
--------------------
Expand Down Expand Up @@ -191,3 +195,4 @@ we'll be able to accept your pull requests.
[10]: #fork-oauth2client
[11]: #include-tests
[12]: #make-the-pull-request
[13]: http://oauth2client.readthedocs.org/en/latest/#using-pypy
64 changes: 58 additions & 6 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,67 @@ information about using OAuth2 with Google APIs
Getting started
---------------

We recommend installing via ``pip``::
We recommend installing via ``pip``:

$ pip install --upgrade oauth2client
.. code-block:: bash
You can also install from source::
$ pip install --upgrade oauth2client
$ git clone https://github.com/google/oauth2client
$ cd oauth2client
$ python setup.py install
You can also install from source:

.. code-block:: bash
$ git clone https://github.com/google/oauth2client
$ cd oauth2client
$ python setup.py install
Using ``pypy``
--------------

- In order to use crypto libraries (e.g. for service accounts) you will
need to install one of ``pycrypto`` or ``pyOpenSSL``.
- Using ``pycrypto`` with ``pypy`` will be in general problematic. If
``libgmp`` is installed on your machine, the ``pycrypto`` install will
attempt to build ``_fastmath.c``. However, this file uses CPython
implementation details and hence can't be built in ``pypy`` (as of
``pypy`` 2.6 and ``pycrypto`` 2.6.1). In order to install

.. code-block:: bash
with_gmp=no pip install --upgrade pycrypto
See discussions on the `pypy issue tracker`_ and the
`pycrypto issue tracker`_.

- Using ``pyOpenSSL`` with versions of ``pypy`` before 2.6 may be in general
problematic since ``pyOpenSSL`` depends on the ``cryptography`` library.
For versions of ``cryptography`` before 1.0, importing ``pyOpenSSL``
with it caused `massive startup costs`_. In order to address this
slow startup, ``cryptography`` 1.0 made some `changes`_ in how it used
``cffi`` when means it can't be used on versions of ``pypy`` before 2.6.

The default version of ``pypy`` you get when installed

.. code-block:: bash
apt-get install pypy pypy-dev
on `Ubuntu 14.04`_ is 2.2.1. In order to upgrade, you'll need to use
the `pypy/ppa PPA`_:

.. code-block:: bash
apt-get purge pypy pypy-dev
add-apt-repository ppa:pypy/ppa
apt-get update
apt-get install pypy pypy-dev
.. _pypy issue tracker: https://bitbucket.org/pypy/pypy/issues/997
.. _pycrypto issue tracker: https://github.com/dlitz/pycrypto/pull/59
.. _massive startup costs: https://github.com/pyca/pyopenssl/issues/137
.. _changes: https://github.com/pyca/cryptography/issues/2275#issuecomment-130751514
.. _Ubuntu 14.04: http://packages.ubuntu.com/trusty/pypy
.. _pypy/ppa PPA: https://launchpad.net/~pypy/+archive/ubuntu/ppa

Downloads
^^^^^^^^^
Expand Down

0 comments on commit 2e4cceb

Please sign in to comment.