-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
45 lines (36 loc) · 1.06 KB
/
Makefile
File metadata and controls
45 lines (36 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
.PHONY: all clean build install uninstall test publish redis-up redis-down
# Default target
all: clean build
# Remove Python + build artifacts
clean:
find . -name "*.pyc" -delete
find . -name "*.pyo" -delete
find . -name "*~" -delete
rm -rf dist build *.egg-info
# Build package (requires: pip install build)
build:
python -m build
# Install locally built package
install:
pip install --force-reinstall dist/*.whl
# Uninstall FQ completely
uninstall:
pip uninstall -y flowdacity-queue
# Run tests — prefers pytest, falls back to python modules
test: redis-up
@status=0; \
uv run pytest tests || uv run python -m unittest discover -s tests || status=$$?; \
$(MAKE) redis-down; \
exit $$status
publish: clean
uv sync --group dev
uv run python -m build
# @if [ -z "$$PYPI_API_TOKEN" ]; then echo "PYPI_API_TOKEN must be set"; exit 1; fi
# uv run python -m twine upload dist/* -u __token__ -p "$$PYPI_API_TOKEN"
uv run python -m twine upload dist/*
# Start Redis container
redis-up:
docker compose up -d redis
# Stop Redis container
redis-down:
docker compose down