another heroku check [5]

This commit is contained in:
Unbit
2013-02-23 13:03:48 +01:00
parent fd62e2ebb7
commit fbabb14c61
+4 -2
View File
@@ -27,13 +27,15 @@ if not 'UWSGI_PYTHON_NOLIB' in os.environ:
libdir = sysconfig.get_config_var('LIBPL')
# libdir does not exists, try to get it from the venv
version = get_python_version()
print(os.listdir('%s/lib' % sys.prefix))
if not os.path.exists(libdir):
libdir = '%s/lib/python%s/config' % (sys.prefix, version)
# try skipping abiflag
if not os.path.exists(libdir) and version.endswith('m'):
version = version[:-1]
libdir = '%s/lib/python%s/config' % (sys.prefix, version)
print(os.listdir('%s/lib/python%s' % (sys.prefix, version)))
# 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('LDLIBRARY'))
if not os.path.exists(libpath):
libpath = '%s/%s' % (libdir, sysconfig.get_config_var('LIBRARY'))