Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 314931

Summary: www-servers/nginx - add uwsgi module
Product: Gentoo Linux Reporter: Domen Kožar <domen>
Component: Current packagesAssignee: Benedikt Böhm (RETIRED) <hollow>
Status: RESOLVED FIXED    
Severity: normal CC: arfrever, dev-zero, domen, torsten, voxus
Priority: High    
Version: 10.1   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: uWSGI 0.9.4.3 ebuild
Nginx 0.8.36 with uwsgi and redis modules
params for nginx uwsgi module
uwsgi-0.9.5.ebuild
uwsgi-0.9.5.ebuild
uwsgi-0.9.5-fix_uwsgiconfig.py_indentation.patch
uwsgi-0.9.5-respect_flags.patch

Description Domen Kožar 2010-04-13 05:39:50 UTC
More information about module http://projects.unbit.it/uwsgi/wiki/RunOnNginx

If someone has half-prepared uwsgi ebuild, now is the time.

Reproducible: Always
Comment 1 Jan 2010-04-21 22:16:11 UTC
Created attachment 228679 [details]
uWSGI 0.9.4.3 ebuild
Comment 2 Jan 2010-04-21 22:16:39 UTC
I wanted to try out uWSGI with Cherokee and found this "bug" when searching for an ebuild.
Since there is none I thought this would be a nice opportunity to try this whole ebuild-writing-thing.
Simple ebuild for uWSGI is attached above.

It only works with python-2.6 since I do not know how to handle the different python versions gracefully (uWSGI uses a different makefile for each python version).

Since my tests with uWSGI were not too encouraging, I am probably not going to keep using it, though...but maybe someone can make use of that ebuild...
Comment 3 Dzmitry Haiduchonak 2010-04-25 12:18:22 UTC
Created attachment 229083 [details]
Nginx 0.8.36 with uwsgi and redis modules
Comment 4 Dzmitry Haiduchonak 2010-04-25 12:18:47 UTC
Created attachment 229085 [details]
params for nginx uwsgi module
Comment 5 Dzmitry Haiduchonak 2010-04-25 12:20:18 UTC
Please try

ACCEPT_KEYWORDS="~amd64" USE="nginx_modules_http_redis  nginx_modules_http_uwsgi aio" emerge -av nginx

works fine for me
Comment 6 Benedikt Böhm (RETIRED) gentoo-dev 2010-05-03 08:59:27 UTC
Arfrever, can you please shed some light on how to handle building the uwsgi binary for multiple versions of python. i have tested it with python 2.6 in my overlay and it works fine, so i'd like to move this to the tree with proper python support.
Comment 7 Domen Kožar 2010-05-03 09:37:29 UTC
I talked to few Gentoo developers and it seems the only way is to contact authors (I have no way of doing that ATM) and rewrite setup.py to use proper distutils Extension support.
Comment 8 Torsten Kurbad 2010-05-03 11:10:10 UTC
Created attachment 230121 [details]
uwsgi-0.9.5.ebuild

Find attached a version of the ebuild that (hopefully) handles Python 2.x versions transparently.

Best regards,
Torsten
Comment 9 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-05-03 17:17:52 UTC
Makefiles only differ in version of Python interpreter, so the main Makefile (which uses 'python') can be used (python_execute_function() properly sets locally active version of Python during each iteration).

Fixing of indentation in uwsgiconfig.py should be sufficent to support Python 3.

uwsgiconfig.py should be fixed to respect CFLAGS and LDFLAGS (currently it uses CFLAGS of dev-lang/python).
Comment 10 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-05-03 17:36:33 UTC
uwsgiconfig.py should use "${CC}" instead of "gcc".

It's possible to build some plugins. Example:
python uwsgiconfig.py --plugin plugins/psgi
Comment 11 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-05-03 17:58:14 UTC
Created attachment 230169 [details]
uwsgi-0.9.5.ebuild
Comment 12 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-05-03 18:00:10 UTC
Created attachment 230171 [details, diff]
uwsgi-0.9.5-fix_uwsgiconfig.py_indentation.patch
Comment 13 Arfrever Frehtes Taifersar Arahesis (RETIRED) gentoo-dev 2010-05-03 18:01:31 UTC
Created attachment 230173 [details, diff]
uwsgi-0.9.5-respect_flags.patch
Comment 14 Benedikt Böhm (RETIRED) gentoo-dev 2010-05-03 19:59:51 UTC
thanks for patches and the ebuild, i have commited it to www-servers/uwsgi and added the uwsgi module to nginx-0.8.36-r1