Post

Makefile

Ali Cloud

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
# Description: Makefile for the project
# Author: Bo

# Current directory
SRC_DIR = .

venv: $(SRC_DIR)/.venv/init_done \#  \# 🐍 Python venv environment

$(SRC_DIR)/.venv/init_done: $(SRC_DIR)/requirements.txt
	python3 -m venv .venv && \
	. .venv/bin/activate && \
	pip install -r requirements.txt && \
	touch $(SRC_DIR)/.venv/init_done

help:  ## πŸ’¬ This help message
	@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'

init: venv ## πŸš€ Initial python venv environment
	@echo "### Virtual environment is ready."

run: venv  ## πŸƒβ€β™‚οΈ Run the application
	. .venv/bin/activate && \
	python3 cn_samlauth_profiles.ali.py

cert: venv ## πŸ“œ Append Cloudflare certificate to certifi bundle
	@echo "Appending Cloudflare certificate to certifi..."
	. .venv/bin/activate && \
	echo | cat - Cloudflare_cert_202502.pem >> `python -m certifi`

clean: ## 🧹 Clean the project
	rm -rf $(SRC_DIR)/.venv

AWS

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
# Description: Makefile for the project
# Author: Bo

# Current directory
SRC_DIR = .

venv: $(SRC_DIR)/.venv/init_done \#  \# 🐍 Python venv environment

$(SRC_DIR)/.venv/init_done: $(SRC_DIR)/requirements.txt
	python3 -m venv .venv && \
	. .venv/bin/activate && \
	pip install -r requirements.txt && \
	touch $(SRC_DIR)/.venv/init_done

help:  ## πŸ’¬ This help message
	@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'

init: venv ## πŸš€ Initial python venv environment
	@echo "### Virtual environment is ready."

run: venv  ## πŸƒβ€β™‚οΈ Run the application
	. .venv/bin/activate && \
	python3 cn_samlauth3_profiles.py

clean: ## 🧹 Clean the project
	rm -rf $(SRC_DIR)/.venv
This post is licensed under CC BY 4.0 by the author.