Skip to content

Commit

Permalink
Move to python3 venv and update vscode settings (stripe#1123)
Browse files Browse the repository at this point in the history
  • Loading branch information
pakrym-stripe authored Nov 10, 2023
1 parent d0772fe commit c98d14d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 12 deletions.
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"recommendations": [
"ms-python.python",
"EditorConfig.editorconfig"
"EditorConfig.editorconfig",
"ms-python.flake8",
]
}
10 changes: 3 additions & 7 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,11 @@

// Formatting
"editor.formatOnSave": true,
"python.formatting.provider": "black",

// Linting
"python.linting.enabled": true,
"python.linting.pylintEnabled": false,
"python.linting.flake8Enabled": true,

// Tests
"python.testing.unittestEnabled": false,
"python.testing.pytestEnabled": true,
"python.testing.nosetestsEnabled": false

"python.terminal.activateEnvironment": true,
"python.defaultInterpreterPath": "~/venv/bin/python3"
}
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
VENV_NAME?=venv
PIP?=pip
PYTHON?=python
PYTHON?=python3

venv: $(VENV_NAME)/bin/activate

$(VENV_NAME)/bin/activate: setup.py
$(PIP) install --upgrade pip virtualenv
@test -d $(VENV_NAME) || $(PYTHON) -m virtualenv --clear $(VENV_NAME)
$(VENV_NAME)/bin/activate: setup.py requirements.txt
@test -d $(VENV_NAME) || $(PYTHON) -m venv --clear $(VENV_NAME)
${VENV_NAME}/bin/python -m pip install -r requirements.txt
@touch $(VENV_NAME)/bin/activate

Expand Down

0 comments on commit c98d14d

Please sign in to comment.