From 20860ed069569309aabefbcb5e9d1d56c5e4c937 Mon Sep 17 00:00:00 2001 From: Unbit Date: Fri, 11 Oct 2013 14:07:02 +0200 Subject: [PATCH] fixed python3 build --- plugins/python/uwsgiplugin.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/plugins/python/uwsgiplugin.py b/plugins/python/uwsgiplugin.py index aac70c7e..f9b4ddb3 100644 --- a/plugins/python/uwsgiplugin.py +++ b/plugins/python/uwsgiplugin.py @@ -32,9 +32,17 @@ if not 'UWSGI_PYTHON_NOLIB' in os.environ: # try 3.x style config dir if not os.path.exists(libdir): libdir = '%s/lib/python%s/config-%s' % (sys.prefix, version, get_python_version()) - libpath = '%s/%s' % (libdir, sysconfig.get_config_var('LIBRARY')) - if not os.path.exists(libpath): + + # get cpu type + uname = os.uname() + if uname[4].startswith('arm'): + libpath = '%s/%s' % (libdir, sysconfig.get_config_var('LIBRARY')) + if not os.path.exists(libpath): + libpath = '%s/%s' % (libdir, sysconfig.get_config_var('LDLIBRARY')) + else: libpath = '%s/%s' % (libdir, sysconfig.get_config_var('LDLIBRARY')) + if not os.path.exists(libpath): + libpath = '%s/%s' % (libdir, sysconfig.get_config_var('LIBRARY')) if not os.path.exists(libpath): libpath = '%s/libpython%s.a' % (libdir, version) LIBS.append(libpath)