dev env in vscode

benjamin
Florian Roger 11 months ago
parent ee6fc01441
commit c1ac5cf95e

4
.gitignore vendored

@ -1,4 +1,4 @@
geany/
mkdocs-material/
mkdocs-material
docs/draft
public
venv

@ -4,7 +4,7 @@
{
"label": "install-dependencies",
"type": "shell",
"command": "pip install -r requirements.txt",
"command": "./create_venv.sh",
"group": {
"kind": "build",
"isDefault": true

@ -0,0 +1,15 @@
#!/bin/bash
# Read configurations from pyvenv.cfg
home=$(awk -F' = ' '$1=="home"{print $2}' pyvenv.cfg)
executable=$(awk -F' = ' '$1=="executable"{print $2}' pyvenv.cfg)
version=$(awk -F' = ' '$1=="version"{print $2}' pyvenv.cfg)
# Check if venv exists, if not, create it using the details from pyenv.cfg
if [ ! -d "venv" ]; then
$executable -m venv venv
fi
# Install requirements
venv/bin/python -m pip install --upgrade pip
venv/bin/python -m pip install -r requirements.txt

@ -2,4 +2,4 @@ home = /usr/bin
include-system-site-packages = false
version = 3.11.2
executable = /usr/bin/python3.11
command = /usr/bin/python3 -m venv /home/greg/workspace/doc
command = /usr/bin/python3 -m venv ./venv

Loading…
Cancel
Save