forked from saeeddhqan/Maryam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
56 lines (35 loc) · 1.27 KB
/
Makefile
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
first: help
# ------------------------------------------------------------------------------
# Build
install: ## Install package
python3 setup.py install
build: ## Build package by sdist
python3 setup.py sdist
build-default: ## Build package by build (recommended)
python3 -m build
uninstall: ## Uninstall package
pip uninstall maryam
bash uninstall.sh
upload-pypi: ## Upload package to PyPI
python3 -m twine upload dist/*.tar.gz
upload-test: ## Upload package to test PyPI
python3 -m twine upload --repository test dist/*.tar.gz
# ------------------------------------------------------------------------------
# Testing
check: ## Check linting
flake8
isort . --project maryam --check-only --diff
black . --check
fmt: ## Format source
isort . --project maryam
black .
# ------------------------------------------------------------------------------
# Other
clean: ## Clean build files
rm -rf build dist site .pytest_cache .eggs
find . -type f -name '*.py[co]' -delete
find . -type d -name __pycache__ -exec rm -rf {} +
rm -rf *.egg-info
rm -r docs/build
help: ## Show this help menu
@grep -E '^[0-9a-zA-Z_-]+:.*?##.*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?##"; OFS="\t\t"}; {printf "\033[36m%-30s\033[0m %s\n", $$1, ($$2==""?"":$$2)}'