python: Remove the -builtin flag for SWIG.

* lang/python/setup.py.in: Call SWIG without the builtin flag.
--

The SWIG documentation
<http://www.swig.org/Doc2.0/Python.html#Python_nn28> leaves the
impression that -builtin is solely for increasing performance:

    New in SWIG version 2.0.4: The use of Python proxy classes has
    performance implications that may be unacceptable for a high-
    performance library. The new -builtin option instructs SWIG to
    forego the use of proxy classes, and instead create wrapped types as
    new built-in Python types. When this option is used, the following
    section ("Proxy classes") does not apply. Details on the use of the
    -builtin option are in the Built-in Types section.

While not wasting CPU cycles is good, it also prevents Python code being
written in the wrapper itself. That, however, may be useful to make it
easier to extend the wrapper.

Partially reverts: 856bcfe293

Signed-off-by: Tobias Mueller <muelli@cryptobitch.de>
This commit is contained in:
Tobias Mueller 2016-12-20 18:02:20 +01:00 committed by Justus Winter
parent d356519170
commit aa49be1ab8
No known key found for this signature in database
GPG Key ID: DD1A52F9DA8C9020

View File

@ -154,7 +154,7 @@ class BuildExtFirstHack(build):
py3 = [] if sys.version_info.major < 3 else ['-py3']
swige = Extension("gpg._gpgme", ["gpgme.i", "helpers.c"],
swig_opts = ['-threads', '-builtin',
swig_opts = ['-threads',
'-outdir', 'gpg'] + py3 + extra_swig_opts,
include_dirs = include_dirs,
define_macros = define_macros,