Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame^] | 1 | From 52f8fd2010b900c7d382a7c4e6c1a317d8160585 Mon Sep 17 00:00:00 2001 |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 2 | From: Hongxu Jia <hongxu.jia@windriver.com> |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame^] | 3 | Date: Fri, 10 May 2019 14:30:36 +0800 |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 4 | Subject: [PATCH 2/7] gpgme/lang/python: gpg-error-config should not be used |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 5 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 6 | gpg-error-config was modified by OE to always return an error. |
| 7 | So we want to find an alternative way to retrieve whatever it |
| 8 | is we need. |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 9 | |
| 10 | Upstream-Status: Inappropriate [changes are specific to OE] |
| 11 | |
| 12 | Signed-off-by: Mark Hatle <mark.hatle@windriver.com> |
| 13 | |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame^] | 14 | Rebase to 1.13.0 |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 15 | |
| 16 | Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> |
| 17 | --- |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame^] | 18 | lang/python/setup.py.in | 9 +-------- |
| 19 | 1 file changed, 1 insertion(+), 8 deletions(-) |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 20 | |
| 21 | diff --git a/lang/python/setup.py.in b/lang/python/setup.py.in |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame^] | 22 | index 9785a28..006216d 100755 |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 23 | --- a/lang/python/setup.py.in |
| 24 | +++ b/lang/python/setup.py.in |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 25 | @@ -30,7 +30,6 @@ import subprocess |
| 26 | import sys |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 27 | |
| 28 | # Out-of-tree build of the gpg bindings. |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame^] | 29 | -gpg_error_config = ['gpg-error-config'] |
| 30 | gpgme_config_flags = ['--thread=pthread'] |
| 31 | gpgme_config = ['gpgme-config'] + gpgme_config_flags |
| 32 | gpgme_h = '' |
| 33 | @@ -182,15 +181,9 @@ class BuildExtFirstHack(build): |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 34 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 35 | def _generate_errors_i(self): |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame^] | 36 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 37 | - try: |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 38 | - subprocess.check_call( |
| 39 | - gpg_error_config + ['--version'], stdout=devnull) |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 40 | - except: |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame^] | 41 | - sys.exit('Could not find gpg-error-config. ' + |
| 42 | - 'Please install the libgpg-error development package.') |
| 43 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 44 | gpg_error_content = self._read_header( |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame^] | 45 | - 'gpg-error.h', getconfig('cflags', config=gpg_error_config)) |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 46 | + "gpg-error.h", os.environ.get('CFLAGS').split()) |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 47 | |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 48 | filter_re = re.compile(r'GPG_ERR_[^ ]* =') |
| 49 | rewrite_re = re.compile(r' *(.*) = .*') |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 50 | -- |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 51 | 2.7.4 |
Brad Bishop | d7bf8c1 | 2018-02-25 22:55:05 -0500 | [diff] [blame] | 52 | |