[git] GPGME - branch, master, updated. gpgme-1.12.0-111-gfbc298d

by Ben McGinnes cvs at cvs.gnupg.org
Sun Dec 16 07:14:15 CET 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG Made Easy".

The branch, master has been updated
       via  fbc298dc1b0fbb51ebc92a9d56c45b78c5e9989d (commit)
      from  4308d172816f3172454fac1dc0771014056764a1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit fbc298dc1b0fbb51ebc92a9d56c45b78c5e9989d
Author: Ben McGinnes <ben at adversary.org>
Date:   Sun Dec 16 17:12:21 2018 +1100

    python: howto and examples
    
    * Tightening up both the documentation and some of the example code.
    
    Tested-by: Ben McGinnes <ben at adversary.org>
    Signed-off-by: Ben McGinnes <ben at adversary.org>

diff --git a/lang/python/doc/rst/gpgme-python-howto.rst b/lang/python/doc/rst/gpgme-python-howto.rst
index 7843965..be77bb7 100644
--- a/lang/python/doc/rst/gpgme-python-howto.rst
+++ b/lang/python/doc/rst/gpgme-python-howto.rst
@@ -367,7 +367,7 @@ needed, both by and in order to create, the bindings (including both the
    If specifying a selected number of languages to create bindings for,
    try to leave Python last. Currently the majority of the other
    language bindings are also preceding Python of either version when
-   listed alphabetically and so that just happens by default currently.
+   listed alphabetically (not counting the Qt bindings).
 
    If Python is set to precede one of the other languages then it is
    possible that the errors described here may interrupt the build
@@ -376,6 +376,12 @@ needed, both by and in order to create, the bindings (including both the
    bindings separately with alternative ``configure`` steps for GPGME
    using the ``--enable-languages=$LANGUAGE`` option.
 
+   Alternatively ``make`` (or ``gmake``, depending on your platform) may
+   be run with the the ``-k`` option, which tells make to keep going
+   even if errors are encountered. In that case the failure of one
+   language\'s set of bindings to build should not hamper another
+   language\'s bindings to build.
+
 .. _snafu-lessons-for-the-lazy:
 
 Reinstalling Responsibly
@@ -2939,21 +2945,17 @@ information in Python.
    else:
        gpgconfcmd = "gpgconf --list-options gpg"
 
-   try:
-       lines = subprocess.getoutput(gpgconfcmd).splitlines()
-   except:
-       process = subprocess.Popen(gpgconfcmd.split(), stdout=subprocess.PIPE)
-       procom = process.communicate()
-       if sys.version_info[0] == 2:
-           lines = procom[0].splitlines()
-       else:
-           lines = procom[0].decode().splitlines()
+   process = subprocess.Popen(gpgconfcmd.split(), stdout=subprocess.PIPE)
+   procom = process.communicate()
 
-   for i in range(len(lines)):
-       if lines[i].startswith("group") is True:
-           line = lines[i]
-       else:
-           pass
+   if sys.version_info[0] == 2:
+       lines = procom[0].splitlines()
+   else:
+       lines = procom[0].decode().splitlines()
+
+   for line in lines:
+       if line.startswith("group") is True:
+           break
 
    groups = line.split(":")[-1].replace('"', '').split(',')
 
diff --git a/lang/python/doc/src/gpgme-python-howto b/lang/python/doc/src/gpgme-python-howto
index 0c1239b..9157680 100644
--- a/lang/python/doc/src/gpgme-python-howto
+++ b/lang/python/doc/src/gpgme-python-howto
@@ -397,7 +397,7 @@ both by and in order to create, the bindings (including both the
 If specifying a selected number of languages to create bindings for,
 try to leave Python last.  Currently the majority of the other
 language bindings are also preceding Python of either version when
-listed alphabetically and so that just happens by default currently.
+listed alphabetically (not counting the Qt bindings).
 
 If Python is set to precede one of the other languages then it is
 possible that the errors described here may interrupt the build
@@ -406,6 +406,12 @@ these cases it may be preferable to configure all preferred language
 bindings separately with alternative =configure= steps for GPGME using
 the =--enable-languages=$LANGUAGE= option.
 
+Alternatively =make= (or =gmake=, depending on your platform) may be
+run with the the =-k= option, which tells make to keep going even if
+errors are encountered.  In that case the failure of one language's
+set of bindings to build should not hamper another language's bindings
+to build.
+
 
 *** Reinstalling Responsibly
     :PROPERTIES:
@@ -3000,21 +3006,17 @@ if sys.platform == "win32":
 else:
     gpgconfcmd = "gpgconf --list-options gpg"
 
-try:
-    lines = subprocess.getoutput(gpgconfcmd).splitlines()
-except:
-    process = subprocess.Popen(gpgconfcmd.split(), stdout=subprocess.PIPE)
-    procom = process.communicate()
-    if sys.version_info[0] == 2:
-        lines = procom[0].splitlines()
-    else:
-        lines = procom[0].decode().splitlines()
+process = subprocess.Popen(gpgconfcmd.split(), stdout=subprocess.PIPE)
+procom = process.communicate()
 
-for i in range(len(lines)):
-    if lines[i].startswith("group") is True:
-        line = lines[i]
-    else:
-        pass
+if sys.version_info[0] == 2:
+    lines = procom[0].splitlines()
+else:
+    lines = procom[0].decode().splitlines()
+
+for line in lines:
+    if line.startswith("group") is True:
+        break
 
 groups = line.split(":")[-1].replace('"', '').split(',')
 
diff --git a/lang/python/doc/texinfo/gpgme-python-howto.texi b/lang/python/doc/texinfo/gpgme-python-howto.texi
index 552ef91..7d505b4 100644
--- a/lang/python/doc/texinfo/gpgme-python-howto.texi
+++ b/lang/python/doc/texinfo/gpgme-python-howto.texi
@@ -566,7 +566,7 @@ IMPORTANT Note
 If specifying a selected number of languages to create bindings for,
 try to leave Python last.  Currently the majority of the other
 language bindings are also preceding Python of either version when
-listed alphabetically and so that just happens by default currently.
+listed alphabetically (not counting the Qt bindings).
 
 If Python is set to precede one of the other languages then it is
 possible that the errors described here may interrupt the build
@@ -574,6 +574,12 @@ process before generating bindings for those other languages.  In
 these cases it may be preferable to configure all preferred language
 bindings separately with alternative @samp{configure} steps for GPGME using
 the @samp{--enable-languages=$LANGUAGE} option.
+
+Alternatively @samp{make} (or @samp{gmake}, depending on your platform) may be
+run with the the @samp{-k} option, which tells make to keep going even if
+errors are encountered.  In that case the failure of one language's
+set of bindings to build should not hamper another language's bindings
+to build.
 @end enumerate
 
 @node Reinstalling Responsibly
@@ -3139,21 +3145,17 @@ if sys.platform == "win32":
 else:
     gpgconfcmd = "gpgconf --list-options gpg"
 
-try:
-    lines = subprocess.getoutput(gpgconfcmd).splitlines()
-except:
-    process = subprocess.Popen(gpgconfcmd.split(), stdout=subprocess.PIPE)
-    procom = process.communicate()
-    if sys.version_info[0] == 2:
-        lines = procom[0].splitlines()
-    else:
-        lines = procom[0].decode().splitlines()
+process = subprocess.Popen(gpgconfcmd.split(), stdout=subprocess.PIPE)
+procom = process.communicate()
 
-for i in range(len(lines)):
-    if lines[i].startswith("group") is True:
-        line = lines[i]
-    else:
-        pass
+if sys.version_info[0] == 2:
+    lines = procom[0].splitlines()
+else:
+    lines = procom[0].decode().splitlines()
+
+for line in lines:
+    if line.startswith("group") is True:
+        break
 
 groups = line.split(":")[-1].replace('"', '').split(',')
 
diff --git a/lang/python/examples/howto/groups.py b/lang/python/examples/howto/groups.py
index 0418abd..98659cc 100644
--- a/lang/python/examples/howto/groups.py
+++ b/lang/python/examples/howto/groups.py
@@ -37,21 +37,17 @@ if sys.platform == "win32":
 else:
     gpgconfcmd = "gpgconf --list-options gpg"
 
-try:
-    lines = subprocess.getoutput(gpgconfcmd).splitlines()
-except:
-    process = subprocess.Popen(gpgconfcmd.split(), stdout=subprocess.PIPE)
-    procom = process.communicate()
-    if sys.version_info[0] == 2:
-        lines = procom[0].splitlines()
-    else:
-        lines = procom[0].decode().splitlines()
+process = subprocess.Popen(gpgconfcmd.split(), stdout=subprocess.PIPE)
+procom = process.communicate()
 
-for i in range(len(lines)):
-    if lines[i].startswith("group") is True:
-        line = lines[i]
-    else:
-        pass
+if sys.version_info[0] == 2:
+    lines = procom[0].splitlines()
+else:
+    lines = procom[0].decode().splitlines()
+
+for line in lines:
+    if line.startswith("group") is True:
+        break
 
 groups = line.split(":")[-1].replace('"', '').split(',')
 

-----------------------------------------------------------------------

Summary of changes:
 lang/python/doc/rst/gpgme-python-howto.rst      | 32 +++++++++++++------------
 lang/python/doc/src/gpgme-python-howto          | 32 +++++++++++++------------
 lang/python/doc/texinfo/gpgme-python-howto.texi | 32 +++++++++++++------------
 lang/python/examples/howto/groups.py            | 24 ++++++++-----------
 4 files changed, 61 insertions(+), 59 deletions(-)


hooks/post-receive
-- 
GnuPG Made Easy
http://git.gnupg.org




More information about the Gnupg-commits mailing list