diff --git a/wrapper/python/README.rst b/wrapper/python/README.rst index 0b7852a21..53c9f5158 100644 --- a/wrapper/python/README.rst +++ b/wrapper/python/README.rst @@ -9,101 +9,104 @@ wolfcrypt: the wolfSSL Crypto Engine **wolfCrypt** is a lightweight, portable, C-language-based crypto library targeted at IoT, embedded, and RTOS environments primarily because of its size, speed, and feature set. It works seamlessly in desktop, enterprise, and cloud -environments as well. +environments as well. It is the crypto engine behind wolfSSl's embedded ssl +library. Installation ------------ -Dependencies -~~~~~~~~~~~~ +In order to use ``wolfcrypt``, first you'll need to install ``wolfssl`` C +embedded ssl library. -Before installing ``wolfcrypt``, make sure you have ``wolfssl`` C library -installed in your machine: +Installing ``wolfssl`` : +~~~~~~~~~~~~~~~~~~~~~~~~ + +**Mac OSX** .. code-block:: console - $ git clone git@github.com:wolfssl/wolfssl.git - $ cd wolfssl - $ ./autogen.sh - $ ./configure - $ make - $ sudo make install + brew install wolfssl -**Linux ONLY:** Update your dynamic linker: +or .. code-block:: console - $ sudo ldconfig - # or - $ export LD_LIBRARY_PATH=/usr/local/lib + git clone https://github.com/wolfssl/wolfssl.git + cd wolfssl/ + ./autogen.sh + ./configure + make + sudo make install -**Linux ONLY:** Make sure you have ``python-dev``, ``python3-dev``, -``python-pip`` and ``libffi-dev`` installed: +**Ubuntu** .. code-block:: console - $ sudo apt-get update - $ sudo apt-get install python-dev python3-dev python-pip libffi-dev + sudo apt-get update + sudo apt-get install -y git autoconf libtool + + git clone https://github.com/wolfssl/wolfssl.git + cd wolfssl/ + ./autogen.sh + ./configure + make + sudo make install + + sudo ldconfig + +**CentOS** + +.. code-block:: console + + sudo rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-6.noarch.rpm + sudo yum update + sudo yum install -y git autoconf libtool + + git clone git@github.com:wolfssl/wolfssl.git + cd wolfssl + ./autogen.sh + ./configure + make + sudo make install + + echo /usr/local/lib > wolfssl.conf + sudo mv wolfssl.conf /etc/ld.so.conf + sudo ldconfig -Now, you can install ``wolfcrypt`` via ``pip`` or ``source code``: - -wolfcrypt pip installation +Installing ``wolfcrypt`` : ~~~~~~~~~~~~~~~~~~~~~~~~~~ -To install ``wolfcrypt`` with ``pip``: +**Mac OSX** .. code-block:: console - $ sudo -H pip install wolfcrypt + sudo -H pip install wolfcrypt -wolfcrypt source installation -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - -1. Get the sources: +**Ubuntu** .. code-block:: console - $ git clone git@github.com:wolfssl/wolfssl.git - $ cd wolfssl/wrapper/python + sudo apt-get install -y python-dev python-pip libffi-dev + sudo -H pip install wolfcrypt -**Before** proceeding with installation, you can test ``wolfcrypt`` locally with -``tox``. If you don't want to run the tests, jump to step 4 instead. - - -2. Make sure that the testing requirements are installed: +**CentOS** .. code-block:: console - $ sudo -H pip install -r requirements-testing.txt + sudo yum install -y python-devel python-pip libffi-devel + sudo -H pip install wolfcrypt -3. Run ``tox``: +Testing ``wolfcrypt`` : +~~~~~~~~~~~~~~~~~~~~~~~ .. code-block:: console - $ tox - ... - _________________________________ summary _________________________________ - py27: commands succeeded - SKIPPED: py34: InterpreterNotFound: python3.4 - py35: commands succeeded - congratulations :) + python -c "from wolfcrypt.hashes import Sha; print Sha().hexdigest()" -Note that some tests might be skipped if you don't have the proper interpreter. - - -**Now**, to install ``wolfcrypt`` from sources: - - -4. Build and install ``wolfcrypt`` - -.. code-block:: console - - $ sudo python setup.py install - ... - Finished processing dependencies for wolfcrypt... +expected output: **da39a3ee5e6b4b0d3255bfef95601890afd80709** diff --git a/wrapper/python/wolfcrypt/__about__.py b/wrapper/python/wolfcrypt/__about__.py index d94ce1926..b5c1697d0 100644 --- a/wrapper/python/wolfcrypt/__about__.py +++ b/wrapper/python/wolfcrypt/__about__.py @@ -20,14 +20,14 @@ metadata = dict( __name__ = "wolfcrypt", - __version__ = "0.1.6", + __version__ = "0.1.7", __license__ = "GPLv2 or Commercial License", __author__ = "wolfSSL Inc.", __author_email__ = "info@wolfssl.com", __url__ = "https://wolfssl.github.io/wolfcrypt-py", __description__ = \ u"A Python library that encapsulates wolfSSL's wolfCrypt API.", - __keywords__ = "security, cryptography", + __keywords__ = "security, cryptography, ssl, embedded, embedded ssl", __classifiers__ = [ u"License :: OSI Approved :: GNU General Public License v2 (GPLv2)", u"License :: Other/Proprietary License",