Skip to content

Commit

Permalink
Makefile: allow override of Python executable (#178)
Browse files Browse the repository at this point in the history
When testing for multiple Python versions (python3.11, python3.12...)
we need to change the Python executable name.

Signed-off-by: Agathe Porte <gagath@debian.org>
Co-authored-by: Agathe Porte <gagath@debian.org>
  • Loading branch information
gagath and Agathe Porte committed Jul 22, 2024
1 parent 58d71f6 commit 818fa36
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
.PHONY: all dev test lint publish format clean

PYTHON3?=python3

all: format lint test

dev: ## Install a development environment
python3 -m pip install --user --upgrade -e .[dev]
# python3 -m pip install --user --upgrade build
# python3 -m pip install --user --upgrade twine wheel
$(PYTHON3) -m pip install --user --upgrade -e .[dev]
# $(PYTHON3) -m pip install --user --upgrade build
# $(PYTHON3) -m pip install --user --upgrade twine wheel

format: ## Format sources
black kalamine
Expand All @@ -18,13 +20,13 @@ lint: ## Lint sources
mypy kalamine

test: ## Run tests
python3 -m kalamine.cli guide > docs/README.md
python3 -m kalamine.cli build layouts/*.toml
pytest
$(PYTHON3) -m kalamine.cli guide > docs/README.md
$(PYTHON3) -m kalamine.cli build layouts/*.toml
$(PYTHON3) -m pytest

publish: test ## Publish package
rm -rf dist/*
python3 -m build
$(PYTHON3) -m build
twine check dist/*
twine upload dist/*

Expand Down

0 comments on commit 818fa36

Please sign in to comment.