Files
pdfplumber/Makefile
T
***** 938548625b Fix make venv creating the venv at the wrong path
ec96f72 introduced the `VENV` variable (default `.venv`) and switched every
install and tool invocation to use it, but left the creation line as
`python3 -m venv venv`. On a fresh checkout `make venv` therefore creates
`venv/` and then fails immediately trying to run `.venv/bin/pip`.

Use `${VENV}` on the creation line too. This also makes `VENV` overridable
end-to-end, e.g. `make venv VENV=custom-env`, which previously created
`venv/` and installed into a directory that did not exist.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-07-26 20:48:57 -07:00

39 lines
860 B
Makefile

.PHONY: venv tests check-black check-flake lint format examples build
VENV ?= .venv
PYTHON = ${VENV}/bin/python
venv:
python3 -m venv ${VENV}
${VENV}/bin/pip install --upgrade pip
${VENV}/bin/pip install -r requirements.txt
${VENV}/bin/pip install -r requirements-dev.txt
${VENV}/bin/pip install -e .
tests:
${PYTHON} -m pytest -n auto
${PYTHON} -m coverage html
check-black:
${VENV}/bin/black --check pdfplumber tests
check-isort:
${VENV}/bin/isort --profile black --check-only pdfplumber tests
check-flake:
${VENV}/bin/flake8 pdfplumber tests
check-mypy:
${VENV}/bin/mypy --strict --implicit-reexport pdfplumber
lint: check-flake check-mypy check-black check-isort
format:
${VENV}/bin/black pdfplumber tests
${VENV}/bin/isort --profile black pdfplumber tests
examples:
${VENV}/bin/nbexec examples/notebooks
build:
${PYTHON} -m build