Skip to content

Commit

Permalink
Added security extras as installation option.
Browse files Browse the repository at this point in the history
Installs pyopenssl to fix InsecurePlatformWarnings.
  • Loading branch information
hbldh committed Aug 8, 2016
1 parent 871fa88 commit e646d3e
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 4 deletions.
21 changes: 20 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,24 @@ PyBankID can be installed though pip:
pip install pybankid
The remedy the ``InsecurePlatformWarning`` problem detailed below
(`Python 2, urllib3 and certificate verification`_), you can install
``pybankid`` with the ``security`` extras:

.. code-block:: bash
pip install pybankid[security]
This installs the ``pyopenssl``, ``ndg-httpsclient`` and ``pyasn1`` packages
as well.
This does however require the installation of some additional system packages:

.. code-block:: bash
sudo apt-get install build-essential libssl-dev libffi-dev python-dev
See the `cryptography package's documentation for details <https://cryptography.io/en/latest/installation/#building-cryptography-on-linux>`_.

Usage
-----

Expand Down Expand Up @@ -98,7 +116,8 @@ Python 2, urllib3 and certificate verification

An ``InsecurePlatformWarning`` is issued when using the client in Python 2 (See
`urllib3 documentation <https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning>`_).
This can be remedied by installing ``pyopenssl`` according to
This can be remedied by installing ``pybankid`` with the ``security`` extras as
described above, or to manually install ``pyopenssl`` according to
`this issue <https://github.com/kennethreitz/requests/issues/749>`_ and
`docstrings in requests <https://github.com/kennethreitz/requests/blob/master/requests/packages/urllib3/contrib/pyopenssl.py>`_.

Expand Down
2 changes: 1 addition & 1 deletion bankid/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# version.
_version_major = 0
_version_minor = 3
_version_patch = 5
_version_patch = 6
# _version_extra = 'dev1'
# _version_extra = 'a1'
_version_extra = '' # Uncomment this for full releases
Expand Down
19 changes: 19 additions & 0 deletions docs/usage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,31 @@ and obtain the SSL certificate for the test server.

Installation
------------

PyBankID can be installed though pip:

.. code-block:: bash
$ pip install pybankid
The remedy the ``InsecurePlatformWarning`` problem detailed below (
`Python 2, urllib3 and certificate verification`_), you can install
``pybankid`` with the ``security`` extras:

.. code-block:: bash
$ pip install pybankid[security]
This installs the ``pyopenssl``, ``ndg-httpsclient`` and ``pyasn1`` packages
as well.
This does however require the installation of some additional system packages:

.. code-block:: bash
$ sudo apt-get install build-essential libssl-dev libffi-dev python-dev
See the `cryptography package's documentation for details <https://cryptography.io/en/latest/installation/#building-cryptography-on-linux>`_.

Dependencies
------------

Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
],
dependency_links=[],
ext_modules=[],
entry_points={
}
extras_require={
'security': ['pyOpenSSL>=0.13', 'ndg-httpsclient', 'pyasn1'],
},
)

0 comments on commit e646d3e

Please sign in to comment.