From: Tobias Brunner Date: Wed, 11 May 2016 09:11:44 +0000 (+0200) Subject: vici: Add README.rst to be used as description on PyPI X-Git-Tag: 5.4.1dr4~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa844a798b76b09667cccaa569debd8313949d17;p=thirdparty%2Fstrongswan.git vici: Add README.rst to be used as description on PyPI --- diff --git a/src/libcharon/plugins/vici/python/MANIFEST.in b/src/libcharon/plugins/vici/python/MANIFEST.in index 1aba38f67a..9d5d250d09 100644 --- a/src/libcharon/plugins/vici/python/MANIFEST.in +++ b/src/libcharon/plugins/vici/python/MANIFEST.in @@ -1 +1,2 @@ include LICENSE +include README.rst diff --git a/src/libcharon/plugins/vici/python/Makefile.am b/src/libcharon/plugins/vici/python/Makefile.am index 20d44b5b2b..6088200e24 100644 --- a/src/libcharon/plugins/vici/python/Makefile.am +++ b/src/libcharon/plugins/vici/python/Makefile.am @@ -1,4 +1,4 @@ -EXTRA_DIST = LICENSE MANIFEST.in \ +EXTRA_DIST = LICENSE README.rst MANIFEST.in \ setup.py.in \ vici/test/__init__.py \ vici/test/test_protocol.py \ diff --git a/src/libcharon/plugins/vici/python/README.rst b/src/libcharon/plugins/vici/python/README.rst new file mode 100644 index 0000000000..3990f63002 --- /dev/null +++ b/src/libcharon/plugins/vici/python/README.rst @@ -0,0 +1,24 @@ +About +----- + +The strongSwan VICI protocol allows external applications to monitor, configure +and control the IKE daemon charon. This Python package provides a native client +side implementation of the VICI protocol, well suited to script automated tasks +in a reliable way. + + +Example Usage +------------- + +.. code-block:: python + + >>> import vici + >>> s = vici.Session() + >>> s.version() + OrderedDict([('daemon', b'charon'), ('version', b'5.4.0'), + ('sysname', b'Linux'), ('release', b'3.13.0-27-generic'), ('machine', b'x86_64')]) + >>> s.load_pool({"p1": {"addrs": "10.0.0.0/24"}}) + OrderedDict([('success', b'yes')]) + >>> s.get_pools() + OrderedDict([('p1', OrderedDict([('base', b'10.0.0.0'), ('size', b'254'), + ('online', b'0'), ('offline', b'0')]))]) diff --git a/src/libcharon/plugins/vici/python/setup.py.in b/src/libcharon/plugins/vici/python/setup.py.in index 0e2bf0d55b..62b0c58996 100644 --- a/src/libcharon/plugins/vici/python/setup.py.in +++ b/src/libcharon/plugins/vici/python/setup.py.in @@ -1,12 +1,7 @@ from setuptools import setup - -long_description = ( - "The strongSwan VICI protocol allows external application to monitor, " - "configure and control the IKE daemon charon. This python package provides " - "a native client side implementation of the VICI protocol, well suited to " - "script automated tasks in a reliable way." -) +with open('README.rst') as file: + long_description = file.read() setup( name="vici",