From 6dc5730a234f4bc8a0cbfb0bd3360e860d39e340 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Sat, 26 Mar 2016 00:17:35 +0100 Subject: [PATCH] Add variable plugin_build_dir to uwsgiconfig Package managers in Alpine Linux (APK) and Gentoo (Portage) builds packages in different directory than where are eventually installed. Therefore we need to set different plugin_dir for build and runtime. Gentoo ebuild for uWSGI solved this problem using simple workaround that involves patching uwsgiconfig.py (see [1]). This patch do the same thing; it adds build variable plugin_build_dir, but with fallback to plugin_dir for backward compatibility. [1]: https://github.com/gentoo/gentoo/blob/master/www-servers/uwsgi/uwsgi-2.0.11.2-r1.ebuild#L149 --- uwsgiconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uwsgiconfig.py b/uwsgiconfig.py index 835d6b4..617d6b3 100644 --- a/uwsgiconfig.py +++ b/uwsgiconfig.py @@ -1424,7 +1424,7 @@ def build_plugin(path, uc, cflags, ldflags, libs, name=None): pass if uc: - plugin_dest = uc.get('plugin_dir') + '/' + name + '_plugin' + plugin_dest = uc.get('plugin_build_dir', uc.get('plugin_dir')) + '/' + name + '_plugin' else: plugin_dest = name + '_plugin'