summaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorMichel Normand <normand@linux.vnet.ibm.com>2018-02-08 15:01:09 +0100
committerMatěj Cepl <mcepl@cepl.eu>2018-02-08 18:49:09 +0000
commit0bb9693a53eae94761498e8412684cd6ed339781 (patch)
treee398791b45f0765c4c4ba9e826493685e3b69106 /setup.py
parent801ece9090d1e044a7db24e905d74936e8f4dd59 (diff)
downloadm2crypto-0bb9693a53eae94761498e8412684cd6ed339781.tar.gz
Add ppc64le in setup.py to avoid build error
=== swig -python -D__ppc64le__ -I/usr/include/python3.6m -I/usr/include/ \ -includeall -modern -builtin -outdir \ /home/abuild/rpmbuild/BUILD/M2Crypto-0.27.0/M2Crypto \ -o SWIG/_m2crypto_wrap.c SWIG/_m2crypto.i /usr/include//gnu/stubs.h:8: Error: Unable to find 'gnu/stubs-32.h' error: command 'swig' failed with exit status 1 error: Bad exit status from /var/tmp/rpm-tmp.ugv4sN (%build) === Signed-off-by: Michel Normand <normand@linux.vnet.ibm.com>
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/setup.py b/setup.py
index 1f1600a..6aa1ab4 100644
--- a/setup.py
+++ b/setup.py
@@ -161,13 +161,15 @@ class _M2CryptoBuildExt(build_ext.build_ext):
mach = platform.machine().lower()
if mach in ('i386', 'i486', 'i586', 'i686'):
arch = '__i386__'
- elif mach in ('ppc64', 'powerpc64'):
+ elif mach in ('ppc64', 'powerpc64', 'ppc64le', 'ppc64el'):
arch = '__powerpc64__'
elif mach in ('ppc', 'powerpc'):
arch = '__powerpc__'
else:
arch = '__%s__' % mach
self.swig_opts.append('-D%s' % arch)
+ if mach in ('ppc64le', 'ppc64el'):
+ self.swig_opts.append('-D_CALL_ELF=2')
self.swig_opts.extend(['-I%s' % i for i in self.include_dirs])