mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 08:11:00 +00:00
Merge pull request #1168 from Kriechi/venv-py3
add a py3 venv in dev environment
This commit is contained in:
commit
bcfce32bfa
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,6 +2,7 @@
|
|||||||
MANIFEST
|
MANIFEST
|
||||||
*/tmp
|
*/tmp
|
||||||
/venv
|
/venv
|
||||||
|
/venv3
|
||||||
*.py[cdo]
|
*.py[cdo]
|
||||||
*.swp
|
*.swp
|
||||||
*.swo
|
*.swo
|
||||||
|
30
dev.sh
30
dev.sh
@ -1,13 +1,29 @@
|
|||||||
#!/bin/bash
|
#!/bin/sh
|
||||||
set -e
|
set -e
|
||||||
VENV=./venv
|
|
||||||
|
VENV="./venv"
|
||||||
|
VENV3="${VENV}3"
|
||||||
|
|
||||||
python -m virtualenv $VENV --always-copy
|
python -m virtualenv $VENV --always-copy
|
||||||
. $VENV/bin/activate
|
. $VENV/bin/activate
|
||||||
pip install -U pip setuptools
|
pip install -q -U pip setuptools
|
||||||
pip install -r requirements.txt
|
pip install -q -r requirements.txt
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "* Created virtualenv environment in $VENV."
|
echo "* Virtualenv created in $VENV and all dependencies installed."
|
||||||
echo "* Installed all dependencies into the virtualenv."
|
echo "* You can now activate the $(python --version) virtualenv with this command: \`. $VENV/bin/activate\`"
|
||||||
echo "* You can now activate the virtualenv: \`. $VENV/bin/activate\`"
|
|
||||||
|
if $(python --version 2>&1 | grep -q "Python 2.") && command -v python3 >/dev/null 2>&1; then
|
||||||
|
echo ""
|
||||||
|
echo ""
|
||||||
|
|
||||||
|
python3 -m virtualenv "$VENV3" --always-copy
|
||||||
|
. "$VENV3/bin/activate"
|
||||||
|
pip install -q -U pip setuptools
|
||||||
|
pip install -q -r requirements.txt
|
||||||
|
|
||||||
|
echo ""
|
||||||
|
echo "* Virtualenv created in $VENV3 and all dependencies installed."
|
||||||
|
echo "* You can now activate the $(python --version) virtualenv with this command: \`. $VENV3/bin/activate\`"
|
||||||
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user