Skip to content
Snippets Groups Projects
Commit 06bfd60c authored by Einar Largenius's avatar Einar Largenius
Browse files

Setup venv

parent 4a13e3f4
No related branches found
No related tags found
No related merge requests found
# virtualenv
/bin/
/include/
/lib/
/pyvenv.cfg
/venv/
# Settings
/settings.py
......
......@@ -24,14 +24,14 @@ installing packages local to the project.
First create the virtual environment:
```sh
virtualenv -p python2 .
python3 -m venv venv
```
In order to enable it run the shell appropriate script found in the
newly created bin directory, for example:
```sh
source bin/activate
source venv/bin/activate
```
## Installing python dependencies
......
#!/bin/sh
#exit 0 #(krishnaveni: 2022-08-18 till auth1 is fixed due to CVE-2022-2414)
#!/bin/bash
# Initializes environment for supr-ldap-integration
# Source init scripts.
. /etc/profile
# TODO: Update path
LD_LIBRARY_PATH="/supr/lib64:/opt/rh/python27/root/usr/lib64"
export LD_LIBRARY_PATH
# Build virtual environment and call python script.
cd /supr
source bin/activate
python supr_swestore_main.py
if [ $? -ne 0 ]
then
echo "Python script failed"
fi
deactivate
# Source virtual environment and call python script.
cd /supr || exit
. venv/bin/activate
python3 supr_swestore_main.py || echo "Python script failed"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment