python: Fix build in certain cases.
authorJustus Winter <justus@g10code.com>
Thu, 18 May 2017 09:42:13 +0000 (11:42 +0200)
committerJustus Winter <justus@g10code.com>
Thu, 18 May 2017 10:22:29 +0000 (12:22 +0200)
* 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>
lang/python/setup.py.in

index a1279f8..f9dda20 100755 (executable)
@@ -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)