forked from secureagentics/Adrian
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (29 loc) · 1.2 KB
/
Copy pathMakefile
File metadata and controls
36 lines (29 loc) · 1.2 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
# Adrian OSS — top-level developer Makefile
#
# Local-dev convention: every Python entry point goes through the
# project-local ``.venv`` so the bundled ``sdk/`` install (``pip
# install -e ./sdk``) cannot collide with a system-wide ``adrian-sdk``
# wheel from PyPI. ``make sdk-install`` creates the venv and the
# editable install in one shot.
.PHONY: sdk-install sdk-test sdk-clean help
UV := $(shell command -v uv 2> /dev/null)
sdk-install: ## Create .venv and editable-install the bundled SDK
ifndef UV
@echo "uv not found. Install: https://docs.astral.sh/uv/getting-started/installation/"
@exit 1
endif
uv venv --allow-existing
uv pip install -e ./sdk[dev]
@echo ""
@echo "Adrian SDK installed in .venv. Activate with:"
@echo " source .venv/bin/activate"
@echo ""
@echo "Or run anything via uv: 'uv run python ...'"
sdk-test: ## Run the bundled SDK test suite
uv run --project ./sdk pytest sdk/tests
sdk-clean: ## Remove .venv and SDK build artefacts
rm -rf .venv sdk/.venv sdk/dist sdk/build sdk/*.egg-info
help: ## Show this help
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | \
awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-15s\033[0m %s\n", $$1, $$2}'
.DEFAULT_GOAL := help