diff options
-rw-r--r-- | setup.py | 28 | ||||
-rw-r--r-- | sites/www/changelog.rst | 3 | ||||
-rw-r--r-- | sites/www/installing.rst | 24 |
3 files changed, 41 insertions, 14 deletions
@@ -30,9 +30,6 @@ Emphasis is on using SSH2 as an alternative to SSL for making secure connections between python scripts. All major ciphers and hash methods are supported. SFTP client and server mode are both supported too. -Required packages: - Cryptography - To install the development version, ``pip install -e git+https://github.com/paramiko/paramiko/#egg=paramiko``. """ @@ -44,6 +41,21 @@ with open("paramiko/_version.py") as fp: exec(fp.read(), None, _locals) version = _locals["__version__"] +# Have to build extras_require dynamically because it doesn't allow +# self-referencing and I hate repeating myself. +extras_require = { + "gssapi": [ + "pyasn1>=0.1.7", + 'gssapi>=1.4.1;platform_system!="Windows"', + 'pywin32>=2.1.8;platform_system=="Windows"', + ], + "ed25519": ["pynacl>=1.0.1", "bcrypt>=3.1.3"], +} +everything = [] +for subdeps in extras_require.values(): + everything.extend(subdeps) +extras_require["everything"] = everything + setup( name="paramiko", version=version, @@ -73,12 +85,8 @@ setup( "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", ], + # TODO 3.0: remove bcrypt, pynacl and update installation docs noting that + # use of the extras_require(s) is now required for those install_requires=["bcrypt>=3.1.3", "cryptography>=2.5", "pynacl>=1.0.1"], - extras_require={ - "gssapi": [ - "pyasn1>=0.1.7", - 'gssapi>=1.4.1;platform_system!="Windows"', - 'pywin32>=2.1.8;platform_system=="Windows"', - ] - }, + extras_require=extras_require, ) diff --git a/sites/www/changelog.rst b/sites/www/changelog.rst index 91c10eeb..23e9a567 100644 --- a/sites/www/changelog.rst +++ b/sites/www/changelog.rst @@ -2,6 +2,9 @@ Changelog ========= +- :support:`-` Additional :doc:`installation </installing>` ``extras_require`` + "flavors" (``ed25519`` and ``everything``) have been added to our packaging + metadata; see the install docs for details. - :bug:`- major` Paramiko's use of ``subprocess`` for ``ProxyCommand`` support is conditionally imported to prevent issues on limited interpreter platforms like Google Compute Engine. However, any resulting ``ImportError`` was lost diff --git a/sites/www/installing.rst b/sites/www/installing.rst index cffdba5f..26637e16 100644 --- a/sites/www/installing.rst +++ b/sites/www/installing.rst @@ -22,15 +22,28 @@ via `pip <http://pip-installer.org>`_:: We currently support **Python 2.7, 3.4+, and PyPy**. Users on Python 2.6 or older (or 3.3 or older) are urged to upgrade. -Paramiko has only a few direct dependencies: +Paramiko has only a few **direct dependencies**: - The big one, with its own sub-dependencies, is Cryptography; see :ref:`its - specific note below <cryptography>` for more details. + specific note below <cryptography>` for more details; - `bcrypt <https://pypi.org/project/bcrypt/>`_, for Ed25519 key support; - `pynacl <https://pypi.org/project/PyNaCl/>`_, also for Ed25519 key support. -If you need GSS-API / SSPI support, see :ref:`the below subsection on it -<gssapi>` for details on its optional dependencies. +There are also a number of **optional dependencies** you may install using +`setuptools 'extras' +<https://packaging.python.org/tutorials/installing-packages/#installing-setuptools-extras>`_: + +.. TODO 3.0: tweak the ed25519 line to remove the caveat + +- If you want all optional dependencies at once, use ``paramiko[everything]``. +- For GSS-API / SSPI support, use ``paramiko[gssapi]``, though also see + :ref:`the below subsection on it <gssapi>` for details. +- ``paramiko[ed25519]`` references the dependencies for Ed25519 key support. + + - As of Paramiko 2.x this doesn't technically do anything, as those + dependencies are core installation requirements. + - However, you should use this for forwards compatibility; 3.0 will drop + those dependencies from core, leaving them purely optional. .. _release-lines: @@ -116,6 +129,9 @@ optional Python package requirements by changing your installation to refer to (Or update your ``requirements.txt``, or etc.) + +.. TODO: just axe this once legacy gssapi support is gone, no point reiterating + Manual dependency installation ------------------------------ |