-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
114 lines (99 loc) · 4.09 KB
/
Makefile
File metadata and controls
114 lines (99 loc) · 4.09 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
##############################
### Privy Python SDK ###
### Makefile ###
##############################
.DEFAULT_GOAL := help
.PHONY: help
help: ## Show all available targets with descriptions
@printf "\n"
@printf "$(BOLD)$(CYAN)🔐 Privy Python SDK - Makefile Targets$(RESET)\n"
@printf "\n"
@printf "$(BOLD)=== 🚀 Quick Start ===$(RESET)\n"
@grep -h -E '^quickstart.*:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "$(CYAN)%-40s$(RESET) %s\n", $$1, $$2}'
@printf "\n"
@printf "$(BOLD)=== 🐍 Environment Setup ===$(RESET)\n"
@grep -h -E '^env_.*:.*?## .*$$' $(MAKEFILE_LIST) ./makefiles/*.mk 2>/dev/null | awk 'BEGIN {FS = ":.*?## "}; {printf "$(CYAN)%-40s$(RESET) %s\n", $$1, $$2}' | sort -u
@printf "\n"
@printf "$(BOLD)=== 🧪 Testing ===$(RESET)\n"
@grep -h -E '^test_.*:.*?## .*$$' $(MAKEFILE_LIST) ./makefiles/*.mk 2>/dev/null | awk 'BEGIN {FS = ":.*?## "}; {printf "$(CYAN)%-40s$(RESET) %s\n", $$1, $$2}' | sort -u
@printf "\n"
@printf "$(BOLD)=== 🛠️ Development ===$(RESET)\n"
@grep -h -E '^dev_.*:.*?## .*$$' $(MAKEFILE_LIST) ./makefiles/*.mk 2>/dev/null | awk 'BEGIN {FS = ":.*?## "}; {printf "$(CYAN)%-40s$(RESET) %s\n", $$1, $$2}' | sort -u
@printf "\n"
@printf "$(BOLD)=== 📦 Build & Distribution ===$(RESET)\n"
@grep -h -E '^build_.*:.*?## .*$$' $(MAKEFILE_LIST) ./makefiles/*.mk 2>/dev/null | awk 'BEGIN {FS = ":.*?## "}; {printf "$(CYAN)%-40s$(RESET) %s\n", $$1, $$2}' | sort -u
@printf "\n"
@printf "$(BOLD)=== 🧹 Cleaning ===$(RESET)\n"
@grep -h -E '^clean.*:.*?## .*$$' $(MAKEFILE_LIST) ./makefiles/*.mk 2>/dev/null | awk 'BEGIN {FS = ":.*?## "}; {printf "$(CYAN)%-40s$(RESET) %s\n", $$1, $$2}' | sort -u
@printf "\n"
##################
### Quick Start ##
##################
.PHONY: quickstart_dev
quickstart_dev: ## Complete developer setup (install deps + run tests)
@printf "\n"
@printf "$(BOLD)$(GREEN)🔐 Privy Python SDK - Developer Quick Start$(RESET)\n"
@printf "\n"
@printf "$(BOLD)Step 1:$(RESET) Install development dependencies\n"
@printf " $(CYAN)make env_install_dev$(RESET)\n"
@printf "\n"
@$(MAKE) env_install_dev
@printf "\n"
@printf "$(GREEN)✓ Dependencies installed$(RESET)\n"
@printf "\n"
@printf "$(BOLD)Step 2:$(RESET) Run tests\n"
@printf " $(CYAN)make test_unit$(RESET)\n"
@printf "\n"
@$(MAKE) test_unit
@printf "\n"
@printf "$(GREEN)✓ All tests passed$(RESET)\n"
@printf "\n"
@printf "$(BOLD)Step 3:$(RESET) Run quality checks\n"
@printf " $(CYAN)make dev_quality_check$(RESET)\n"
@printf "\n"
@printf "$(BOLD)$(GREEN)✓ Developer setup complete! Happy coding! 🔐$(RESET)\n"
@printf "\n"
@printf "$(BOLD)Next steps:$(RESET)\n"
@printf " • Format code: $(CYAN)make dev_quality_format$(RESET)\n"
@printf " • Run tests: $(CYAN)make test_unit$(RESET)\n"
@printf " • Build package: $(CYAN)make build_package$(RESET)\n"
@printf " • View all commands: $(CYAN)make help$(RESET)\n"
@printf "\n"
################
### Imports ###
################
include ./makefiles/colors.mk
include ./makefiles/common.mk
include ./makefiles/env.mk
include ./makefiles/test.mk
include ./makefiles/dev.mk
include ./makefiles/build.mk
############################
### Target Aliases ###
############################
.PHONY: install
install: env_install_dev ## Alias for env_install_dev
.PHONY: test
test: test_unit ## Alias for test_unit
.PHONY: format
format: dev_quality_format ## Alias for dev_quality_format
.PHONY: check
check: dev_quality_check ## Alias for dev_quality_check
.PHONY: build
build: build_package ## Alias for build_package
.PHONY: clean
clean: clean_dev clean_env clean_build ## Clean up all generated files
$(call print_success,All cleanup complete)
###############################
### Global Error Handling ###
###############################
# Catch-all for undefined targets
%:
@TARGET="$@"; \
printf "\n"; \
printf "$(RED)❌ Error: Unknown target '$(BOLD)%s$(RESET)$(RED)'$(RESET)\n" "$$TARGET"; \
printf "\n"; \
printf "$(YELLOW)💡 Available targets:$(RESET)\n"; \
printf " Run $(CYAN)make help$(RESET) to see all available targets\n"; \
printf "\n"; \
exit 1