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)