Skip to content

Commit fc3d9d9

Browse files
authored
Merge pull request #136 from hoefling/readme-overhaul
Readme overhaul
2 parents 194028b + 825f2c6 commit fc3d9d9

File tree

3 files changed

+153
-128
lines changed

3 files changed

+153
-128
lines changed

README.rst

Lines changed: 90 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,34 @@ python-xmlsec
1515
:target: https://xmlsec.readthedocs.io/en/latest/?badge=latest
1616
:alt: Documentation Status
1717

18-
Python bindings for the XML Security Library.
18+
Python bindings for the `XML Security Library <https://www.aleksey.com/xmlsec/>`_.
19+
20+
Documentation
21+
*************
22+
23+
A documentation for ``xmlsec`` can be found at `xmlsec.readthedocs.io <https://xmlsec.readthedocs.io/>`_.
1924

20-
******
2125
Usage
22-
******
26+
*****
2327

24-
Check the `examples <http://pythonhosted.org/xmlsec/examples.html>`_ to see various examples of signing and verifying using the library.
28+
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.
2529

26-
************
2730
Requirements
2831
************
29-
- libxml2 >= 2.9.1
30-
- libxmlsec1 >= 1.2.14
32+
- ``libxml2 >= 2.9.1``
33+
- ``libxmlsec1 >= 1.2.18``
3134

32-
*******
3335
Install
3436
*******
3537

36-
Pre-Install
37-
-----------
38+
``xmlsec`` is available on PyPI:
39+
40+
.. code-block:: bash
41+
42+
pip install xmlsec
43+
44+
Depending on your OS, you may need to install the required native
45+
libraries first:
3846

3947
Linux (Debian)
4048
^^^^^^^^^^^^^^
@@ -44,178 +52,165 @@ Linux (Debian)
4452
apt-get install libxml2-dev libxmlsec1-dev libxmlsec1-openssl
4553
4654
47-
Note: There is no required version of libxml2 for ubuntu precise,
48-
so need to download and install it manually.
55+
Note: There is no required version of LibXML2 for Ubuntu Precise,
56+
so you need to download and install it manually.
4957

5058
.. code-block:: bash
5159
52-
wget http://xmlsoft.org/sources/libxml2-2.9.1.tar.gz
53-
tar -xvf libxml2-2.9.1.tar.gz
54-
cd libxml2-2.9.1
55-
./configure && make && make install
60+
wget http://xmlsoft.org/sources/libxml2-2.9.1.tar.gz
61+
tar -xvf libxml2-2.9.1.tar.gz
62+
cd libxml2-2.9.1
63+
./configure && make && make install
5664
5765
5866
Linux (CentOS)
5967
^^^^^^^^^^^^^^
6068

6169
.. code-block:: bash
6270
63-
yum install libxml2-devel xmlsec1-devel xmlsec1-openssl-devel libtool-ltdl-devel
71+
yum install libxml2-devel xmlsec1-devel xmlsec1-openssl-devel libtool-ltdl-devel
6472
6573
66-
Mac
67-
^^^
74+
Linux (Fedora)
75+
^^^^^^^^^^^^^^
6876

6977
.. code-block:: bash
7078
71-
brew install libxml2 libxmlsec1 pkg-config
79+
dnf install libxml2-devel xmlsec1-devel xmlsec1-openssl-devel libtool-ltdl-devel
7280
7381
74-
Alpine
75-
^^^^^^
82+
Mac
83+
^^^
7684

7785
.. code-block:: bash
7886
79-
apk add build-base libressl libffi-dev libressl-dev libxslt-dev libxml2-dev xmlsec-dev xmlsec
87+
brew install libxml2 libxmlsec1 pkg-config
8088
8189
82-
Automated
83-
---------
84-
1. **xmlsec** can be installed through `easy_install` or `pip`.
90+
Alpine
91+
^^^^^^
8592

8693
.. code-block:: bash
8794
88-
pip install xmlsec
95+
apk add build-base libressl libffi-dev libressl-dev libxslt-dev libxml2-dev xmlsec-dev xmlsec
96+
8997
98+
Troubleshooting
99+
***************
90100

91101
Mac
92102
^^^
93103

94-
If you get any fatal errors about missing .h files, update your C_INCLUDE_PATH environment variable to
95-
include the appropriate files from the libxml2 and libxmlsec1 libraries.
96-
97-
98-
Windows (Wheel)
99-
^^^^^^^^^^^^^^^
104+
If you get any fatal errors about missing ``.h`` files, update your
105+
``C_INCLUDE_PATH`` environment variable to include the appropriate
106+
files from the ``libxml2`` and ``libxmlsec1`` libraries.
100107

101-
#. Download appropriate binary wheel from `ci.appveyor.com <https://ci.appveyor.com/project/bgaifullin/python-xmlsec>`_ (see build`s artifacts).
102108

103-
#. Install wheel
109+
Windows
110+
^^^^^^^
104111

105-
.. code-block:: bash
106-
107-
pip install <wheel filename>
108-
109-
110-
Windows (pip)
111-
^^^^^^^^^^^^^
112+
Starting with 1.3.7, prebuilt wheels are available for Windows,
113+
so running ``pip install xmlsec`` should suffice. If you want
114+
to build from source:
112115

113116
#. Configure build environment, see `wiki.python.org <https://wiki.python.org/moin/WindowsCompilers>`_ for more details.
114117

115-
#. Install from pip
118+
#. Install from source dist:
116119

117-
.. code-block:: bash
120+
.. code-block:: bash
118121
119-
pip install xmlsec
122+
pip install xmlsec --no-binary=xmlsec
120123
121124
122-
Manual
123-
------
125+
Building from source
126+
********************
124127

125-
#. Clone the **xmlsec** repository to your local computer.
128+
#. Clone the ``xmlsec`` source code repository to your local computer.
126129

127-
.. code-block:: bash
130+
.. code-block:: bash
128131
129-
git clone git://github.com/mehcode/python-xmlsec.git
132+
git clone https://github.com/mehcode/python-xmlsec.git
130133
131-
#. Change into the **xmlsec** root directory.
134+
#. Change into the ``python-xmlsec`` root directory.
132135

133-
.. code-block:: bash
136+
.. code-block:: bash
134137
135-
cd /path/to/xmlsec
138+
cd /path/to/xmlsec
136139
137140
138-
#. Install the project and all its dependencies using `pip`.
141+
#. Install the project and all its dependencies using ``pip``.
139142

140-
.. code-block:: bash
143+
.. code-block:: bash
141144
142-
pip install .
145+
pip install .
143146
144147
145-
************
146148
Contributing
147149
************
148150

149151
Setting up your environment
150-
---------------------------
152+
^^^^^^^^^^^^^^^^^^^^^^^^^^^
151153

152-
#. Follow steps 1 and 2 of the `manual installation instructions <#manual>`_.
154+
#. Follow steps 1 and 2 of the `manual installation instructions <#building-from-source>`_.
153155

154156

155157
#. Initialize a virtual environment to develop in.
156158
This is done so as to ensure every contributor is working with
157159
close-to-identicial versions of packages.
158160

159-
.. code-block:: bash
161+
.. code-block:: bash
160162
161-
mkvirtualenv xmlsec
163+
mkvirtualenv xmlsec
162164
165+
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>`_.
163166

164-
The `mkvirtualenv` command is available from `virtualenvwrapper` which
165-
can be installed by following `link <http://virtualenvwrapper.readthedocs.org/en/latest/install.html#basic-installation>`_
167+
#. Activate the created virtual environment:
166168

167-
#. Install **xmlsec** in development mode with testing enabled.
169+
.. code-block:: bash
170+
171+
workon xmlsec
172+
173+
#. Install ``xmlsec`` in development mode with testing enabled.
168174
This will download all dependencies required for running the unit tests.
169175

170-
.. code-block:: bash
176+
.. code-block:: bash
171177
172-
pip install -r requirements-test.txt
173-
pip install -e "."
178+
pip install -r requirements-test.txt
179+
pip install -e "."
174180
175181
176182
Running the test suite
177-
----------------------
183+
^^^^^^^^^^^^^^^^^^^^^^
178184

179-
#. [Set up your environment](#setting-up-your-environment).
185+
#. `Set up your environment <#setting-up-your-environment>`_.
180186

181187
#. Run the unit tests.
182188

183-
.. code-block:: bash
189+
.. code-block:: bash
184190
185-
py.test tests
191+
pytest tests
186192
187193
#. Tests configuration
188-
Env variable **PYXMLSEC_TEST_ITERATIONS** specifies number of test iterations to detect memory leaks.
189-
190-
Reporting a issue
191-
-----------------
192-
Please attach the output of following information:
193-
version of python-xmlsec
194-
version of libxmlsec1
195-
version of libxml2
196194

197-
output from command:
195+
Env variable ``PYXMLSEC_TEST_ITERATIONS`` specifies number of
196+
test iterations to detect memory leaks.
198197

199-
.. code-block:: bash
200-
201-
pkg-config --cflags xmlsec1
198+
Reporting an issue
199+
^^^^^^^^^^^^^^^^^^
202200

201+
Please attach the output of following information:
203202

204-
******************
205-
Versions of python
206-
******************
203+
* version of ``xmlsec``
204+
* version of ``libxmlsec1``
205+
* version of ``libxml2``
206+
* output from the command
207207

208-
The following versions of python is supported:
208+
.. code-block:: bash
209209
210-
- python2.7
211-
- python3.4
212-
- python3.5 (required libxmlsec1 >= 1.2.18 and libxml2 >= 2.9.1)
213-
- python3.6 (required libxmlsec1 >= 1.2.18 and libxml2 >= 2.9.1)
214-
- python3.7 (required libxmlsec1 >= 1.2.18 and libxml2 >= 2.9.1)
210+
pkg-config --cflags xmlsec1
215211
216-
*******
217212
License
218213
*******
219214

220-
Unless otherwise noted, all files contained within this project are liensed under the MIT opensource license.
221-
See the included file LICENSE or visit `opensource.org <http://opensource.org/licenses/MIT>`_ for more information.
215+
Unless otherwise noted, all files contained within this project are licensed under the MIT opensource license.
216+
See the included ``LICENSE`` file or visit `opensource.org <http://opensource.org/licenses/MIT>`_ for more information.

0 commit comments

Comments
 (0)