Clarify how virtual envs can be used in WSGI mode, and ensure we ship the required bits on Windows.

pull/6/head
Surinder Kumar 2017-09-20 16:22:51 +01:00 committed by Dave Page
parent 354679e69b
commit 263e235862
3 changed files with 12 additions and 3 deletions

View File

@ -402,7 +402,6 @@ REM Main function Ends
:CLEANUP_ENV
ECHO Cleaning up private environment...
rd "%PGBUILDPATH%\%VIRTUALENV%\Include" /S /Q
rd "%PGBUILDPATH%\%VIRTUALENV%\Scripts" /S /Q
DEL /s "%PGBUILDPATH%\%VIRTUALENV%\pip-selfcheck.json"
ECHO Cleaned up private environment successfully.

View File

@ -506,7 +506,6 @@ REM Main function Ends
:CLEANUP_ENV
ECHO Cleaning up private environment...
rd "%PGBUILDPATH%\%VIRTUALENV%\Include" /S /Q
rd "%PGBUILDPATH%\%VIRTUALENV%\Scripts" /S /Q
DEL /s "%PGBUILDPATH%\%VIRTUALENV%\pip-selfcheck.json"
ECHO Cleaned up private environment successfully.

View File

@ -120,6 +120,17 @@ application may be configured similarly to the example below:
Allow from all
</Directory>
</VirtualHost>
Now open the file ``C:\Program Files\pgAdmin4\web\pgAdmin4.wsgi`` with your favorite editor and add the code
below which will activate Python virtual environment when Apache server runs.
.. code-block:: apache
activate_this = 'C:\Program Files\pgAdmin4\venv\Scripts\activate_this.py'
execfile(activate_this, dict(__file__=activate_this))
**Note:** The changes made in ``pgAdmin4.wsgi`` file will revert when pgAdmin4 is either upgraded or downgraded.
Apache HTTPD Configuration (Linux/Unix)
---------------------------------------
@ -132,7 +143,7 @@ application may be configured similarly to the example below:
<VirtualHost *>
ServerName pgadmin.example.com
WSGIDaemonProcess pgadmin processes=1 threads=25
WSGIDaemonProcess pgadmin processes=1 threads=25 python-home=/path/to/python/virtualenv/
WSGIScriptAlias / /opt/pgAdmin4/web/pgAdmin4.wsgi
<Directory /opt/pgAdmin4/web>