|
1 | 1 | python-xmlsec
|
2 | 2 | =============
|
3 | 3 |
|
4 |
| -.. image:: https://img.shields.io/pypi/v/xmlsec.svg?logo=python&logoColor=white |
5 |
| - :target: https://pypi.python.org/pypi/xmlsec |
6 |
| -.. image:: https://img.shields.io/travis/com/mehcode/python-xmlsec/master.svg?logo=travis&logoColor=white&label=Travis%20CI |
7 |
| - :target: https://travis-ci.org/mehcode/python-xmlsec |
8 |
| -.. image:: https://img.shields.io/appveyor/ci/hoefling/xmlsec/master.svg?logo=appveyor&logoColor=white&label=AppVeyor |
9 |
| - :target: https://ci.appveyor.com/project/hoefling/xmlsec |
10 |
| -.. image:: https://github.com/mehcode/python-xmlsec/workflows/manylinux2010/badge.svg |
11 |
| - :target: https://github.com/mehcode/python-xmlsec/actions?query=workflow%3A%22manylinux2010%22 |
12 |
| -.. image:: https://github.com/mehcode/python-xmlsec/workflows/MacOS/badge.svg |
13 |
| - :target: https://github.com/mehcode/python-xmlsec/actions?query=workflow%3A%22MacOS%22 |
14 |
| -.. image:: https://codecov.io/gh/mehcode/python-xmlsec/branch/master/graph/badge.svg |
15 |
| - :target: https://codecov.io/gh/mehcode/python-xmlsec |
16 |
| -.. image:: https://img.shields.io/readthedocs/xmlsec/latest?logo=read-the-docs |
17 |
| - :target: https://xmlsec.readthedocs.io/en/latest/?badge=latest |
18 |
| - :alt: Documentation Status |
19 |
| - |
20 |
| -Python bindings for the `XML Security Library <https://www.aleksey.com/xmlsec/>`_. |
21 |
| - |
22 |
| -Documentation |
23 |
| -************* |
24 |
| - |
25 |
| -A documentation for ``xmlsec`` can be found at `xmlsec.readthedocs.io <https://xmlsec.readthedocs.io/>`_. |
26 |
| - |
27 |
| -Usage |
28 |
| -***** |
29 |
| - |
30 |
| -Check the `examples <https://xmlsec.readthedocs.io/en/latest/examples.html>`_ section in the documentation to see various examples of signing and verifying using the library. |
31 |
| - |
32 |
| -Requirements |
33 |
| -************ |
34 |
| -- ``libxml2 >= 2.9.1`` |
35 |
| -- ``libxmlsec1 >= 1.2.18`` |
36 |
| - |
37 |
| -Install |
38 |
| -******* |
39 |
| - |
40 |
| -``xmlsec`` is available on PyPI: |
41 |
| - |
42 |
| -.. code-block:: bash |
43 |
| -
|
44 |
| - pip install xmlsec |
45 |
| -
|
46 |
| -Depending on your OS, you may need to install the required native |
47 |
| -libraries first: |
48 |
| - |
49 |
| -Linux (Debian) |
50 |
| -^^^^^^^^^^^^^^ |
51 |
| - |
52 |
| -.. code-block:: bash |
53 |
| -
|
54 |
| - apt-get install libxml2-dev libxmlsec1-dev libxmlsec1-openssl |
55 |
| -
|
56 |
| -
|
57 |
| -Note: There is no required version of LibXML2 for Ubuntu Precise, |
58 |
| -so you need to download and install it manually. |
59 |
| - |
60 |
| -.. code-block:: bash |
61 |
| -
|
62 |
| - wget http://xmlsoft.org/sources/libxml2-2.9.1.tar.gz |
63 |
| - tar -xvf libxml2-2.9.1.tar.gz |
64 |
| - cd libxml2-2.9.1 |
65 |
| - ./configure && make && make install |
66 |
| -
|
67 |
| -
|
68 |
| -Linux (CentOS) |
69 |
| -^^^^^^^^^^^^^^ |
70 |
| - |
71 |
| -.. code-block:: bash |
72 |
| -
|
73 |
| - yum install libxml2-devel xmlsec1-devel xmlsec1-openssl-devel libtool-ltdl-devel |
74 |
| -
|
75 |
| -
|
76 |
| -Linux (Fedora) |
77 |
| -^^^^^^^^^^^^^^ |
78 |
| - |
79 |
| -.. code-block:: bash |
80 |
| -
|
81 |
| - dnf install libxml2-devel xmlsec1-devel xmlsec1-openssl-devel libtool-ltdl-devel |
82 |
| -
|
83 |
| -
|
84 |
| -Mac |
85 |
| -^^^ |
86 |
| - |
87 |
| -.. code-block:: bash |
88 |
| -
|
89 |
| - brew install libxml2 libxmlsec1 pkg-config |
90 |
| -
|
91 |
| -
|
92 |
| -Alpine |
93 |
| -^^^^^^ |
94 |
| - |
95 |
| -.. code-block:: bash |
96 |
| -
|
97 |
| - apk add build-base libressl libffi-dev libressl-dev libxslt-dev libxml2-dev xmlsec-dev xmlsec |
98 |
| -
|
99 |
| -
|
100 |
| -Troubleshooting |
101 |
| -*************** |
102 |
| - |
103 |
| -Mac |
104 |
| -^^^ |
105 |
| - |
106 |
| -If you get any fatal errors about missing ``.h`` files, update your |
107 |
| -``C_INCLUDE_PATH`` environment variable to include the appropriate |
108 |
| -files from the ``libxml2`` and ``libxmlsec1`` libraries. |
109 |
| - |
110 |
| - |
111 |
| -Windows |
112 |
| -^^^^^^^ |
113 |
| - |
114 |
| -Starting with 1.3.7, prebuilt wheels are available for Windows, |
115 |
| -so running ``pip install xmlsec`` should suffice. If you want |
116 |
| -to build from source: |
117 |
| - |
118 |
| -#. Configure build environment, see `wiki.python.org <https://wiki.python.org/moin/WindowsCompilers>`_ for more details. |
119 |
| - |
120 |
| -#. Install from source dist: |
121 |
| - |
122 |
| - .. code-block:: bash |
123 |
| -
|
124 |
| - pip install xmlsec --no-binary=xmlsec |
125 |
| -
|
126 |
| -
|
127 |
| -Building from source |
128 |
| -******************** |
129 |
| - |
130 |
| -#. Clone the ``xmlsec`` source code repository to your local computer. |
131 |
| - |
132 |
| - .. code-block:: bash |
133 |
| -
|
134 |
| - git clone https://github.com/mehcode/python-xmlsec.git |
135 |
| -
|
136 |
| -#. Change into the ``python-xmlsec`` root directory. |
137 |
| - |
138 |
| - .. code-block:: bash |
139 |
| -
|
140 |
| - cd /path/to/xmlsec |
141 |
| -
|
142 |
| -
|
143 |
| -#. Install the project and all its dependencies using ``pip``. |
144 |
| - |
145 |
| - .. code-block:: bash |
146 |
| -
|
147 |
| - pip install . |
148 |
| -
|
149 |
| -
|
150 |
| -Contributing |
151 |
| -************ |
152 |
| - |
153 |
| -Setting up your environment |
| 4 | +Gisce tests (Ubuntu 20, 22 and latest / python 2.7 and 3.11) |
154 | 5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
155 | 6 |
|
156 |
| -#. Follow steps 1 and 2 of the `manual installation instructions <#building-from-source>`_. |
157 |
| - |
| 7 | +.. image:: https://github.com/gisce/python-xmlsec/actions/workflows/install_test.yml/badge.svg?logo=python&logoColor=white |
| 8 | + :target: https://github.com/gisce/python-xmlsec/actions/workflows/install_test.yml |
158 | 9 |
|
159 |
| -#. Initialize a virtual environment to develop in. |
160 |
| - This is done so as to ensure every contributor is working with |
161 |
| - close-to-identicial versions of packages. |
162 | 10 |
|
163 |
| - .. code-block:: bash |
164 |
| -
|
165 |
| - mkvirtualenv xmlsec |
166 |
| -
|
167 |
| - The ``mkvirtualenv`` command is available from ``virtualenvwrapper`` package which can be installed by following `link <http://virtualenvwrapper.readthedocs.org/en/latest/install.html#basic-installation>`_. |
168 |
| - |
169 |
| -#. Activate the created virtual environment: |
170 |
| - |
171 |
| - .. code-block:: bash |
172 |
| -
|
173 |
| - workon xmlsec |
174 |
| -
|
175 |
| -#. Install ``xmlsec`` in development mode with testing enabled. |
176 |
| - This will download all dependencies required for running the unit tests. |
177 |
| - |
178 |
| - .. code-block:: bash |
179 |
| -
|
180 |
| - pip install -r requirements-test.txt |
181 |
| - pip install -e "." |
182 |
| -
|
183 |
| -
|
184 |
| -Running the test suite |
185 |
| -^^^^^^^^^^^^^^^^^^^^^^ |
186 |
| - |
187 |
| -#. `Set up your environment <#setting-up-your-environment>`_. |
| 11 | +Installation |
| 12 | +^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
188 | 13 |
|
189 |
| -#. Run the unit tests. |
| 14 | +#. Install ``xmlsec`` patched version. |
190 | 15 |
|
191 | 16 | .. code-block:: bash
|
192 | 17 |
|
193 |
| - pytest tests |
194 |
| -
|
195 |
| -#. Tests configuration |
196 |
| - |
197 |
| - Env variable ``PYXMLSEC_TEST_ITERATIONS`` specifies number of |
198 |
| - test iterations to detect memory leaks. |
199 |
| - |
200 |
| -Reporting an issue |
201 |
| -^^^^^^^^^^^^^^^^^^ |
202 |
| - |
203 |
| -Please attach the output of following information: |
204 |
| - |
205 |
| -* version of ``xmlsec`` |
206 |
| -* version of ``libxmlsec1`` |
207 |
| -* version of ``libxml2`` |
208 |
| -* output from the command |
209 |
| - |
210 |
| - .. code-block:: bash |
| 18 | + pip install git+https://github.com/gisce/python-xmlsec.git |
211 | 19 |
|
212 |
| - pkg-config --cflags xmlsec1 |
213 | 20 |
|
214 | 21 | License
|
215 | 22 | *******
|
|
0 commit comments