blob: f1f8c911fc950924b538037fa087f396c5755e2f [file] [log] [blame]
Brad Bishopd7bf8c12018-02-25 22:55:05 -05001From fb165c9bd96aca8c9ee3e4509c9b6e35d238ad2e Mon Sep 17 00:00:00 2001
2From: Mark Hatle <mark.hatle@windriver.com>
3Date: Wed, 16 Aug 2017 02:02:47 -0400
4Subject: [PATCH 2/5] gpgme/lang/python: gpg-error-config should not be used.
5
6gpg-error-config was modified by OE to always return an error. So we want
7to find an alternative way to retrieve whatever it is we need. It turns
8out that the system is just trying to find the path to the gpg-error.h, which
9we can pull in from the STAGING_INC environment.
10
11Upstream-Status: Inappropriate [changes are specific to OE]
12
13Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
14
15Rebase to 1.9.0
16
17Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
18---
19 lang/python/setup.py.in | 15 ++-------------
20 1 file changed, 2 insertions(+), 13 deletions(-)
21
22diff --git a/lang/python/setup.py.in b/lang/python/setup.py.in
23index bf4efa3..7c34487 100755
24--- a/lang/python/setup.py.in
25+++ b/lang/python/setup.py.in
26@@ -24,7 +24,6 @@ import glob
27 import subprocess
28
29 # Out-of-tree build of the gpg bindings.
30-gpg_error_config = ["gpg-error-config"]
31 gpgme_config_flags = ["--thread=pthread"]
32 gpgme_config = ["gpgme-config"] + gpgme_config_flags
33 gpgme_h = ""
34@@ -52,13 +51,6 @@ else:
35 devnull = open(os.devnull, "w")
36
37 try:
38- subprocess.check_call(gpg_error_config + ['--version'],
39- stdout=devnull)
40-except:
41- sys.exit("Could not find gpg-error-config. " +
42- "Please install the libgpg-error development package.")
43-
44-try:
45 subprocess.check_call(gpgme_config + ['--version'],
46 stdout=devnull)
47 except:
48@@ -81,12 +73,9 @@ if not (major > 1 or (major == 1 and minor >= 7)):
49 if not gpgme_h:
50 gpgme_h = os.path.join(getconfig("prefix")[0], "include", "gpgme.h")
51
52-gpg_error_prefix = getconfig("prefix", config=gpg_error_config)[0]
53-gpg_error_h = os.path.join(gpg_error_prefix, "include", "gpg-error.h")
54+gpg_error_h = os.path.join(os.getenv('STAGING_INCDIR'), "gpg-error.h")
55 if not os.path.exists(gpg_error_h):
56- gpg_error_h = \
57- glob.glob(os.path.join(gpg_error_prefix, "include",
58- "*", "gpg-error.h"))[0]
59+ sys.exit("gpg_error_h not found: %s" % gpg_error_h)
60
61 print("Building python gpg module using {} and {}.".format(gpgme_h, gpg_error_h))
62
63--
642.8.1
65