-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UWSGI_AS_LIB #3
Comments
@sixninetynine very cool, thanks for sharing. I also found this commit: unbit/uwsgi@5a17557 that eludes to
which would make it significantly easier to integrate into a pex - and could obsolete or vastly reduce the surface area needed in something like I'll have to dig more into this later. thanks for reaching out! |
just to close the loop on this, specifying the actual implementation we are using in prod is somewhat more robust, but you get the idea |
hey @kwlzn !
Firstly, I'm a big fan of this project -- but I recently discovered (accidentally) that when building uwsgi you can set an environment variable
UWSGI_AS_LIB
which the build system checks for. If supplied, it will compile uwsgi as a shared library!This can be used with python's
ctypes
to invoke the uwsgi executable from within the python runtime. Here's an example (from this issue on unbit's page unbit/uwsgi#564):Since this is happening after the python runtime has initialized, I presume it would work with pex!
Lo and behold:
I thought this was pretty cool and I wanted to take advantage of it, but right now I'm stuck on how to reliably
pip install
uwsgi with this environment variable exported. Check it out:Clearly it says it compiled a shared library:
uWSGI shared library (./this_is_just_a_test.so) is ready, move it to a library directory
However, it doesn't appear to have 😞
You may be wondering what's the point? idk, just wanted to share some findings. Thanks for reading 📖
-- loren
The text was updated successfully, but these errors were encountered: