Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame^] | 1 | gpgme/lang/python: gpg-error-config should not be used. |
| 2 | |
| 3 | gpg-error-config was modified by OE to always return an error. So we want |
| 4 | to find an alternative way to retrieve whatever it is we need. It turns |
| 5 | out that the system is just trying to find the path to the gpg-error.h, which |
| 6 | we can pull in from the STAGING_INC environment. |
| 7 | |
| 8 | Upstream-Status: Inappropriate [changes are specific to OE] |
| 9 | |
| 10 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> |
| 11 | |
| 12 | Index: gpgme-1.8.0/lang/python/setup.py.in |
| 13 | =================================================================== |
| 14 | --- gpgme-1.8.0.orig/lang/python/setup.py.in |
| 15 | +++ gpgme-1.8.0/lang/python/setup.py.in |
| 16 | @@ -24,7 +24,6 @@ import glob |
| 17 | import subprocess |
| 18 | |
| 19 | # Out-of-tree build of the gpg bindings. |
| 20 | -gpg_error_config = ["gpg-error-config"] |
| 21 | gpgme_config_flags = ["--thread=pthread"] |
| 22 | gpgme_config = ["gpgme-config"] + gpgme_config_flags |
| 23 | gpgme_h = "" |
| 24 | @@ -52,13 +51,6 @@ else: |
| 25 | devnull = open(os.devnull, "w") |
| 26 | |
| 27 | try: |
| 28 | - subprocess.check_call(gpg_error_config + ['--version'], |
| 29 | - stdout=devnull) |
| 30 | -except: |
| 31 | - sys.exit("Could not find gpg-error-config. " + |
| 32 | - "Please install the libgpg-error development package.") |
| 33 | - |
| 34 | -try: |
| 35 | subprocess.check_call(gpgme_config + ['--version'], |
| 36 | stdout=devnull) |
| 37 | except: |
| 38 | @@ -81,12 +73,9 @@ if not (major > 1 or (major == 1 and min |
| 39 | if not gpgme_h: |
| 40 | gpgme_h = os.path.join(getconfig("prefix")[0], "include", "gpgme.h") |
| 41 | |
| 42 | -gpg_error_prefix = getconfig("prefix", config=gpg_error_config)[0] |
| 43 | -gpg_error_h = os.path.join(gpg_error_prefix, "include", "gpg-error.h") |
| 44 | +gpg_error_h = os.path.join(os.getenv('STAGING_INCDIR'), "gpg-error.h") |
| 45 | if not os.path.exists(gpg_error_h): |
| 46 | - gpg_error_h = \ |
| 47 | - glob.glob(os.path.join(gpg_error_prefix, "include", |
| 48 | - "*", "gpg-error.h"))[0] |
| 49 | + sys.exit("gpg_error_h not found: %s" % gpg_error_h) |
| 50 | |
| 51 | print("Building python gpg module using {} and {}.".format(gpgme_h, gpg_error_h)) |
| 52 | |