forked from skyzh/canvas_grab
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
code: add quick-start scripts (skyzh#113)
- Loading branch information
Showing
4 changed files
with
52 additions
and
11 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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/pwsh | ||
$ErrorActionPreference = "Stop" | ||
|
||
echo "Check Python installation..." | ||
python3 --version | ||
|
||
echo "Check virtual environment..." | ||
|
||
if (-Not(Test-Path -Path venv)) { | ||
echo "Create virtual environment..." | ||
python3 -m venv venv | ||
echo "Activate virtual environment..." | ||
. ./venv/bin/Activate.ps1 | ||
echo "Install dependencies with SJTUG mirror..." | ||
python -m pip install --upgrade pip -i https://mirrors.sjtug.sjtu.edu.cn/pypi/web/simple | ||
python -m pip install -r requirements.txt -i https://mirrors.sjtug.sjtu.edu.cn/pypi/web/simple | ||
python -m pip install -r requirements.windows.txt -i https://mirrors.sjtug.sjtu.edu.cn/pypi/web/simple | ||
} else { | ||
echo "Activate virtual environment..." | ||
. ./venv/bin/Activate.ps1 | ||
} | ||
|
||
python main.py $@ |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
echo "Check Python installation..." | ||
python3 --version | ||
|
||
echo "Check virtual environment..." | ||
|
||
if [ ! -d "venv" ]; then | ||
echo "Create virtual environment..." | ||
python3 -m venv venv | ||
echo "Activate virtual environment..." | ||
. venv/bin/activate | ||
echo "Install dependencies with SJTUG mirror..." | ||
python -m pip install --upgrade pip -i https://mirrors.sjtug.sjtu.edu.cn/pypi/web/simple | ||
python -m pip install -r requirements.txt -i https://mirrors.sjtug.sjtu.edu.cn/pypi/web/simple | ||
else | ||
echo "Activate virtual environment..." | ||
. venv/bin/activate | ||
fi | ||
|
||
python main.py $@ |
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