|
| 1 | +python-xmlsec |
| 2 | +============= |
| 3 | + |
| 4 | +.. image:: https://travis-ci.org/mehcode/python-xmlsec.png?branch=master |
| 5 | + :target: https://travis-ci.org/mehcode/python-xmlsec |
| 6 | +.. image:: https://img.shields.io/pypi/v/xmlsec.svg |
| 7 | + :target: https://pypi.python.org/pypi/xmlsec |
| 8 | +.. image:: https://img.shields.io/pypi/dm/xmlsec.svg |
| 9 | + :target: https://pypi.python.org/pypi/xmlsec |
| 10 | + |
| 11 | + |
| 12 | +Python bindings for the XML Security Library. |
| 13 | + |
| 14 | +****** |
| 15 | +Usage |
| 16 | +****** |
| 17 | + |
| 18 | +Check the `examples <https://github.com/mehcode/python-xmlsec/tree/master/tests/examples>`_ to see various examples of signing and verifying using the library. |
| 19 | + |
| 20 | +************ |
| 21 | +Requirements |
| 22 | +************ |
| 23 | +- libxml2 >= 2.9.1 |
| 24 | +- libxmlsec1 >= 1.2.14 |
| 25 | + |
| 26 | +******* |
| 27 | +Install |
| 28 | +******* |
| 29 | + |
| 30 | +Pre-Install |
| 31 | +----------- |
| 32 | + |
| 33 | +Linux (Debian) |
| 34 | +^^^^^^^^^^^^^^ |
| 35 | + |
| 36 | +.. code-block:: bash |
| 37 | +
|
| 38 | + apt-get install libxml2-dev libxmlsec1-dev libxmlsec1-opensssl |
| 39 | +
|
| 40 | +
|
| 41 | +Note: There is no required version of libxml2 for ubuntu precise, |
| 42 | +so need to dowload and install it manually. |
| 43 | + |
| 44 | +.. code-block:: bash |
| 45 | +
|
| 46 | + wget http://xmlsoft.org/sources/libxml2-2.9.1.tar.gz |
| 47 | + tar -xvf libxml2-2.9.1.tar.gz |
| 48 | + cd libxml2-2.9.1 |
| 49 | + ./configure && make && make install |
| 50 | +
|
| 51 | +
|
| 52 | +Linux (CentOS) |
| 53 | +^^^^^^^^^^^^^^ |
| 54 | + |
| 55 | +.. code-block:: bash |
| 56 | +
|
| 57 | + yum install libxml2-devel xmlsec1-devel xmlsec1-openssl-devel libtool-ltdl-devel |
| 58 | +
|
| 59 | +
|
| 60 | +Mac |
| 61 | +^^^ |
| 62 | + |
| 63 | +.. code-block:: bash |
| 64 | +
|
| 65 | + brew install libxml2 libxmlsec1 |
| 66 | +
|
| 67 | +
|
| 68 | +Automated |
| 69 | +--------- |
| 70 | +1. **xmlsec** can be installed through `easy_install` or `pip`. |
| 71 | + |
| 72 | +.. code-block:: bash |
| 73 | +
|
| 74 | + pip install xmlsec |
| 75 | +
|
| 76 | +
|
| 77 | +Mac |
| 78 | +^^^ |
| 79 | + |
| 80 | +If you get any fatal errors about missing .h files, update your C_INCLUDE_PATH environment variable to |
| 81 | +include the appropriate files from the libxml2 and libxmlsec1 libraries. |
| 82 | + |
| 83 | +Manual |
| 84 | +------ |
| 85 | + |
| 86 | +1. Clone the **xmlsec** repository to your local computer. |
| 87 | + |
| 88 | +.. code-block:: bash |
| 89 | +
|
| 90 | + git clone git://github.com/mehcode/python-xmlsec.git |
| 91 | +
|
| 92 | +2. Change into the **xmlsec** root directory. |
| 93 | + |
| 94 | +.. code-block:: bash |
| 95 | +
|
| 96 | + cd /path/to/xmlsec |
| 97 | +
|
| 98 | +
|
| 99 | +3. Install the project and all its dependencies using `pip`. |
| 100 | + |
| 101 | +.. code-block:: bash |
| 102 | +
|
| 103 | + pip install . |
| 104 | +
|
| 105 | +
|
| 106 | +************ |
| 107 | +Contributing |
| 108 | +************ |
| 109 | + |
| 110 | +Setting up your environment |
| 111 | +--------------------------- |
| 112 | + |
| 113 | +1. Follow steps 1 and 2 of the [manual installation instructions][]. |
| 114 | + |
| 115 | +[manual installation instructions]: #manual |
| 116 | + |
| 117 | +2. Initialize a virtual environment to develop in. |
| 118 | + This is done so as to ensure every contributor is working with |
| 119 | + close-to-identicial versions of packages. |
| 120 | + |
| 121 | +.. code-block:: bash |
| 122 | +
|
| 123 | + mkvirtualenv xmlsec |
| 124 | +
|
| 125 | +
|
| 126 | + The `mkvirtualenv` command is available from `virtualenvwrapper` which |
| 127 | + can be installed by following: http://virtualenvwrapper.readthedocs.org/en/latest/install.html#basic-installation |
| 128 | +
|
| 129 | +3. Install **xmlsec** in development mode with testing enabled. |
| 130 | + This will download all dependencies required for running the unit tests. |
| 131 | + |
| 132 | +.. code-block:: bash |
| 133 | +
|
| 134 | + pip install -r requirements-test.txt |
| 135 | + pip install -e "." |
| 136 | +
|
| 137 | +
|
| 138 | +Running the test suite |
| 139 | +---------------------- |
| 140 | + |
| 141 | +1. [Set up your environment](#setting-up-your-environment). |
| 142 | + |
| 143 | +2. Run the unit tests. |
| 144 | + |
| 145 | +.. code-block:: bash |
| 146 | +
|
| 147 | + py.test tests |
| 148 | +
|
| 149 | +
|
| 150 | +****************** |
| 151 | +Versions of python |
| 152 | +****************** |
| 153 | + |
| 154 | +The following versions of python is supported: |
| 155 | + |
| 156 | + - python2.7 |
| 157 | + - python3.4 |
| 158 | + - python3.5 (required libxmlsec1 >= 1.2.18 and libxml2 >= 2.9.1) |
| 159 | + - python3.6 (required libxmlsec1 >= 1.2.18 and libxml2 >= 2.9.1) |
| 160 | + |
| 161 | +******* |
| 162 | +License |
| 163 | +******* |
| 164 | + |
| 165 | +Unless otherwise noted, all files contained within this project are liensed under the MIT opensource license. |
| 166 | +See the included file LICENSE or visit `opensource.org <http://opensource.org/licenses/MIT>`_ for more information. |
0 commit comments