python: Fix build in certain cases.

* lang/python/setup.py.in: Prepend the Python build dir to the list of
include directories so that it takes precedence over any other include
directory.
--
Fixes the build in case an older 'gpgme.h' is installed and is picked
up by the compiler when compiling the Python module.

Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
Justus Winter 2017-05-18 11:42:13 +02:00
parent a9b4c0ad0d
commit 84a203e60b
No known key found for this signature in database
GPG Key ID: DD1A52F9DA8C9020

View File

@ -223,7 +223,7 @@ class BuildExtFirstHack(build):
swig_sources.extend((self._in_build_base('gpgme.i'), self._in_build_base('helpers.c')))
swig_opts.extend(['-I' + self.build_base,
'-outdir', os.path.join(self.build_lib, 'gpg')])
include_dirs.append(self.build_base)
include_dirs.insert(0, self.build_base)
self.run_command('build_ext')
build.run(self)