Skip to content

Commit 42d95e2

Browse files
author
Pan
committed
Updated documentation, readme, contribution guide
1 parent bbc21c1 commit 42d95e2

File tree

5 files changed

+88
-41
lines changed

5 files changed

+88
-41
lines changed

.github/CONTRIBUTING.rst

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,7 @@ When a pull request is ready to be merged, the source branch containing your cha
3131
Ground Rules
3232
============
3333

34-
Please keep in mind the `Code of Conduct <https://github.com/InfluxGraph/ssh2-python/blob/master/.github/code_of_conduct.md>`_
35-
when making contributions.
34+
Please keep in mind the `Code of Conduct <https://github.com/ParallelSSH/ssh2-python/blob/master/.github/code_of_conduct.md>`_ when making contributions.
3635

3736
Responsibilities
3837

@@ -82,10 +81,7 @@ A) If the error is from a Python traceback, include it in the bug report.
8281

8382
B) We also need to know what platform you're running (Windows, macOS, Linux,
8483
docker container, etc.), the version of your Python interpreter, and the
85-
version of the library at the time of the error.
86-
87-
C) If at all possible, steps to reproduce including sample InfluxDB data are
88-
the best way to help fixing the issue as quickly as possible.
84+
versions of the library and ``libssh2`` at the time of the error.
8985

9086
There is also an issue template to help with creating issues.
9187

@@ -281,7 +277,8 @@ to be enabled on that repository.
281277
Building the documentation
282278
--------------------------
283279

284-
Documentation is based on Sphinx, which needs to be installed to build it.
280+
Documentation is based on Sphinx, which is installed by development requirements per instructions
281+
at `Running the unit test suite`_.
285282

286283
In root directory of repository:
287284

@@ -292,7 +289,7 @@ In root directory of repository:
292289
293290
After building succeeds the documentation is available at ``doc/_build/html``.
294291

295-
The documentation is not currently uploaded due to issues building the native code extensions on `readthedocs`.
292+
The documentation is automatically uploaded to `ReadTheDocs <http://ssh2-python.readthedocs.org/en/latest/>`_ for master branch and tagged builds.
296293

297294
.. _contributing-verify:
298295

README.rst

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,24 @@ Super fast SSH2 protocol library. ``ssh2-python`` provides Python bindings for `
2525
Installation
2626
______________
2727

28-
29-
System packages are available on the `latest releases page <https://github.com/ParallelSSH/ssh2-python/releases/latest>`_ built on Centos/RedHat 6/7, Ubuntu 14.04/16.04, Debian 7/8 and Fedora 22/23/24.
30-
31-
System packages have *no dependencies* other than the ``libssh2`` system library.
32-
33-
Binary wheel packages are also provided for Linux, OSX and Windows, all Python versions, with ``libssh2`` and its required libraries included.
28+
Binary wheel packages are provided for Linux, OSX and Windows, all Python versions, with ``libssh2`` and its required libraries included.
3429

3530
Wheel packages have **no dependencies**.
3631

32+
``pip`` may need to be updated to be able to install binary wheel packages - ``pip install -U pip``.
33+
3734
.. code-block:: shell
3835
3936
pip install ssh2-python
4037
4138
39+
System packages are also available on the `latest release page <https://github.com/ParallelSSH/ssh2-python/releases/latest>`_ built on Centos/RedHat 6/7, Ubuntu 14.04/16.04, Debian 7/8 and Fedora 22/23/24.
40+
41+
System packages have *no dependencies* other than the ``libssh2`` system library.
42+
43+
`Conda <https://conda.io/miniconda.html>`_ is another installation option - see `documentation <http://ssh2-python.readthedocs.org/en/latest/>`_ for more detailed instructions.
44+
45+
4246
API Feature Set
4347
________________
4448

@@ -49,6 +53,21 @@ Complete example scripts for various operations can be found in the `examples di
4953

5054
In addition, as ``ssh2-python`` is a thin wrapper of ``libssh2`` with Python semantics, its code examples can be ported straight over to Python with only minimal changes.
5155

56+
Library Features
57+
----------------
58+
59+
The library uses `Cython`_ based native code extensions as wrappers to ``libssh2``.
60+
61+
Extension features:
62+
63+
* Thread safe - GIL is released as much as possible
64+
* Very low overhead
65+
* Super fast as a consequence of the excellent C library it uses and prodigious use of native code
66+
* Object oriented - memory freed automatically and safely as objects are garbage collected by Python
67+
* Use Python semantics where applicable, such as context manager and iterator support for opening and reading from SFTP file handles
68+
* Expose errors as Python exceptions where possible
69+
* Provide access to ``libssh2`` error code definitions
70+
5271

5372
Quick Start
5473
_____________
@@ -232,22 +251,6 @@ ________________________________________
232251
And more, as per `libssh2`_ functionality.
233252

234253

235-
Native Code Extension Features
236-
_______________________________
237-
238-
The library uses `Cython`_ based native code extensions as wrappers to ``libssh2``.
239-
240-
Extension features:
241-
242-
* Thread safe - GIL is released as much as possible
243-
* Very low overhead
244-
* Super fast as a consequence of the excellent C library it uses and that it uses native code prodigiously
245-
* Object oriented - memory freed automatically and safely as objects expire
246-
* Use Python semantics where applicable, such as iterator support for reading from SFTP file handles
247-
* Expose errors as Python exceptions where possible
248-
* Provide access to ``libssh2`` error code definitions
249-
250-
251254
Comparison with other Python SSH libraries
252255
-------------------------------------------
253256

doc/Changelog.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../Changelog.rst

doc/index.rst

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,22 @@ ssh2-python Documentation
99
Super fast SSH2 protocol library. ``ssh2-python`` provides Python bindings for `libssh2`_.
1010

1111
.. image:: https://img.shields.io/badge/License-LGPL%20v2-blue.svg
12-
:target: https://pypi.python.org/pypi/ssh2-python
13-
:alt: License
12+
:target: https://pypi.python.org/pypi/ssh2-python
13+
:alt: License
1414
.. image:: https://img.shields.io/pypi/v/ssh2-python.svg
15-
:target: https://pypi.python.org/pypi/ssh2-python
16-
:alt: Latest Version
15+
:target: https://pypi.python.org/pypi/ssh2-python
16+
:alt: Latest Version
1717
.. image:: https://travis-ci.org/ParallelSSH/ssh2-python.svg?branch=master
1818
:target: https://travis-ci.org/ParallelSSH/ssh2-python
19-
19+
.. image:: https://ci.appveyor.com/api/projects/status/github/parallelssh/ssh2-python?svg=true&branch=master
20+
:target: https://ci.appveyor.com/project/pkittenis/ssh2-python
21+
.. image:: https://img.shields.io/pypi/wheel/ssh2-python.svg
22+
:target: https://pypi.python.org/pypi/ssh2-python
23+
.. image:: https://img.shields.io/pypi/pyversions/ssh2-python.svg
24+
:target: https://pypi.python.org/pypi/ssh2-python
25+
.. image:: https://readthedocs.org/projects/ssh2-python/badge/?version=latest
26+
:target: http://ssh2-python.readthedocs.org/en/latest/
27+
:alt: Latest documentation
2028

2129
.. toctree::
2230
:maxdepth: 2
@@ -25,7 +33,7 @@ Super fast SSH2 protocol library. ``ssh2-python`` provides Python bindings for `
2533
introduction
2634
installation
2735
api
28-
36+
Changelog
2937

3038
Indices and tables
3139
==================

doc/installation.rst

Lines changed: 43 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,27 @@
11
Installation
22
*************
33

4+
Pip Binary Packages
5+
====================
6+
7+
Binary wheel packages are provided for Linux, OSX and Windows, all Python versions, with ``libssh2`` and its required libraries included.
8+
9+
Wheel packages have **no dependencies**.
10+
11+
``pip`` may need to be updated to be able to install binary wheel packages.
12+
13+
.. code-block:: shell
14+
15+
pip install -U pip
16+
17+
pip install ssh2-python
18+
19+
.. note::
20+
21+
Latest version of OpenSSL is included in Linux and OSX binary wheel packages. On Windows, the native WinCNG back-end is used instead.
22+
23+
To control which version of OpenSSL is used for the installation either use system packages which use system libraries, the conda package, or install from source.
24+
425
System Binary Packages
526
=======================
627

@@ -10,29 +31,46 @@ To use, download and install via the system's package manager, for example for C
1031

1132
.. code-block:: shell
1233
13-
yum install -y python-ssh2-python-0.4.0-1.el7.x86_64.rpm
34+
yum install -y python-ssh2-python-0.6.0-1.el7.x86_64.rpm
35+
36+
Conda package
37+
===============
38+
39+
A `conda <https://conda.io/miniconda.html>`_ package is available in the `conda-forge` channel.
40+
41+
To install, run the following.
42+
43+
.. code-block:: shell
44+
45+
conda install -c conda-forge ssh2-python
1446
1547
Installation from Source
1648
==========================
1749

1850
To install from source, ``libssh2`` and Python development headers are required.
1951

52+
Clone the repository, install dependencies and run install in a new virtualenv from the repository's root directory.
53+
2054
Ubuntu
2155
--------
2256

2357
.. code-block:: shell
2458
25-
apt-get install libssh2-1-dev python-dev
26-
pip install ssh2-python
59+
sudo apt-get install libssh2-1-dev python-dev
60+
virtualenv my_env
61+
source my_env/bin/activate
62+
python setup.py install
2763
2864
2965
RedHat
3066
-------
3167

3268
.. code-block:: shell
3369
34-
yum install libssh2-devel python-devel
35-
pip install ssh2-python
70+
sudo yum install libssh2-devel python-devel
71+
virtualenv my_env
72+
source my_env/bin/activate
73+
python setup.py install
3674
3775
3876
Testing Installation

0 commit comments

Comments
 (0)