Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change virtual environment path to "venv" in 'init.sh' and 'start.sh'
[ci skip]
- Loading branch information
Showing
3 changed files
with
8 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
#!/bin/sh | ||
|
||
echo "Generating a virtual environment..." | ||
python3 -m venv . | ||
. bin/activate | ||
python3 -m venv venv | ||
. venv/bin/activate | ||
echo "Installing dependencies..." | ||
echo | ||
pip install setuptools wheel --upgrade | ||
pip install -r requirements.txt | ||
echo | ||
|
||
echo "Creating a configuration file..." | ||
cp examples/config.py app/config.py | ||
sudo chgrp www-data app/config.py | ||
cp examples/config.py app/ | ||
sudo chgrp www-data app/config.py || echo "Group 'www-data' not found. Change the group of 'app/config' file manually!" | ||
chmod o-r app/config.py | ||
echo | ||
|
||
echo "Done. Don't forget to replace fake values in 'app/config.py' with your actual ones." | ||
echo "Use the '. bin/activate' command to enable the virtual environment. Inside, type 'deactivate' to disable it." | ||
echo "Use the '. venv/bin/activate' command to enable the virtual environment. Inside, type 'deactivate' to disable it." | ||
echo "The 'start.sh' script is a shortcut to enter the virtual environment and run the bot." | ||
echo | ||
echo "If you want to run tests, execute the following command in addition:" | ||
echo " . bin/activate && pip install -r requirements-dev.txt && deactivate" | ||
echo " . venv/bin/activate && pip install -r requirements-dev.txt && deactivate" | ||
echo |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!/bin/sh | ||
|
||
. bin/activate | ||
. venv/bin/activate | ||
export PYTHONPATH=app | ||
exec app/bot.py |