fixes install instructions

This commit is contained in:
Moisés Guimarães 2016-05-20 03:55:57 -03:00
parent 47a1dd8cc4
commit fcc0eb7a6a
2 changed files with 62 additions and 59 deletions
wrapper/python

@ -9,101 +9,104 @@ wolfcrypt: the wolfSSL Crypto Engine
**wolfCrypt** is a lightweight, portable, C-language-based crypto library **wolfCrypt** is a lightweight, portable, C-language-based crypto library
targeted at IoT, embedded, and RTOS environments primarily because of its size, targeted at IoT, embedded, and RTOS environments primarily because of its size,
speed, and feature set. It works seamlessly in desktop, enterprise, and cloud 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 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 Installing ``wolfssl`` :
installed in your machine: ~~~~~~~~~~~~~~~~~~~~~~~~
**Mac OSX**
.. code-block:: console .. code-block:: console
$ git clone git@github.com:wolfssl/wolfssl.git brew install wolfssl
$ cd wolfssl
$ ./autogen.sh
$ ./configure
$ make
$ sudo make install
**Linux ONLY:** Update your dynamic linker: or
.. code-block:: console .. code-block:: console
$ sudo ldconfig git clone https://github.com/wolfssl/wolfssl.git
# or cd wolfssl/
$ export LD_LIBRARY_PATH=/usr/local/lib ./autogen.sh
./configure
make
sudo make install
**Linux ONLY:** Make sure you have ``python-dev``, ``python3-dev``, **Ubuntu**
``python-pip`` and ``libffi-dev`` installed:
.. code-block:: console .. code-block:: console
$ sudo apt-get update sudo apt-get update
$ sudo apt-get install python-dev python3-dev python-pip libffi-dev 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``: Installing ``wolfcrypt`` :
wolfcrypt pip installation
~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~
To install ``wolfcrypt`` with ``pip``: **Mac OSX**
.. code-block:: console .. code-block:: console
$ sudo -H pip install wolfcrypt sudo -H pip install wolfcrypt
wolfcrypt source installation **Ubuntu**
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1. Get the sources:
.. code-block:: console .. code-block:: console
$ git clone git@github.com:wolfssl/wolfssl.git sudo apt-get install -y python-dev python-pip libffi-dev
$ cd wolfssl/wrapper/python sudo -H pip install wolfcrypt
**Before** proceeding with installation, you can test ``wolfcrypt`` locally with **CentOS**
``tox``. If you don't want to run the tests, jump to step 4 instead.
2. Make sure that the testing requirements are installed:
.. code-block:: console .. 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 .. code-block:: console
$ tox python -c "from wolfcrypt.hashes import Sha; print Sha().hexdigest()"
...
_________________________________ summary _________________________________
py27: commands succeeded
SKIPPED: py34: InterpreterNotFound: python3.4
py35: commands succeeded
congratulations :)
Note that some tests might be skipped if you don't have the proper interpreter. expected output: **da39a3ee5e6b4b0d3255bfef95601890afd80709**
**Now**, to install ``wolfcrypt`` from sources:
4. Build and install ``wolfcrypt``
.. code-block:: console
$ sudo python setup.py install
...
Finished processing dependencies for wolfcrypt...

@ -20,14 +20,14 @@
metadata = dict( metadata = dict(
__name__ = "wolfcrypt", __name__ = "wolfcrypt",
__version__ = "0.1.6", __version__ = "0.1.7",
__license__ = "GPLv2 or Commercial License", __license__ = "GPLv2 or Commercial License",
__author__ = "wolfSSL Inc.", __author__ = "wolfSSL Inc.",
__author_email__ = "info@wolfssl.com", __author_email__ = "info@wolfssl.com",
__url__ = "https://wolfssl.github.io/wolfcrypt-py", __url__ = "https://wolfssl.github.io/wolfcrypt-py",
__description__ = \ __description__ = \
u"A Python library that encapsulates wolfSSL's wolfCrypt API.", u"A Python library that encapsulates wolfSSL's wolfCrypt API.",
__keywords__ = "security, cryptography", __keywords__ = "security, cryptography, ssl, embedded, embedded ssl",
__classifiers__ = [ __classifiers__ = [
u"License :: OSI Approved :: GNU General Public License v2 (GPLv2)", u"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
u"License :: Other/Proprietary License", u"License :: Other/Proprietary License",