-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathMakefile
More file actions
27 lines (23 loc) · 751 Bytes
/
Makefile
File metadata and controls
27 lines (23 loc) · 751 Bytes
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
TARGET_NAME := "perfect_python_project"
PYTHON_VERSION := $(shell python --version | sed -r -e 's/Python //' -e 's/\.[0-9]+$$//')
VCS ?= hg
test:
@echo Target: /tmp/$(TARGET_NAME)
@if [ -d /tmp/$(TARGET_NAME) ]; then \
rm -rf /tmp/$(TARGET_NAME); \
fi
@echo -n "default_context:\n\
author: \"Fulano de Tal\"\n\
email: \"fulano@email.com\"\n\
project_slug: \"$(TARGET_NAME)\"\n\
python_version: \"$(PYTHON_VERSION)\"\n\
line_length: 100\n\
version_control: \"$(VCS)\"\n\
" > /tmp/$(TARGET_NAME).yml
cookiecutter --no-input --config-file /tmp/$(TARGET_NAME).yml \
--keep-project-on-failure -o /tmp .
cd /tmp/$(TARGET_NAME); \
uv run make lint && \
uv run make test && \
uv run make audit && \
echo '\nSuccess!'