I've managed to compile sqlite3 v 3.16.2 and generate a shared library object. If I set inside bash shell the variable LD_LIBRARY_PATH to the location where the shared library is I am able to run "python manage.py shell" and import the new version of the library, but it doesn't work for my server instance since the LD_LIBRARY_PATH variable does not appear to be set. At first I put
export LD_LIBRARY_PATH=/home/Sirion/opt/lib
inside my .bashrc, which (obviously) doesn't get called when the server is run. So I moved the export inside postactivate hook of my virtualenv, but still LD_LIBRARY_PATH doesn't appear at all among system variables when I print the content of os.environ inside wsgi.py (before creating the wsgi application).
So, do you make any kind of trick when initializing the server which obfuscates LD_LIBRARY_PATH variable?