-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmakefile
72 lines (53 loc) · 1.72 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# -*- coding: utf8 -*-
# Copyright (c) blurryroots innovation qanat OÜ All Rights Reserved.
FILE_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
PROJECT_DIR := $(realpath -s $(shell dirname $(FILE_PATH)))
SHELL := /bin/bash
audit:
pip-audit --desc
pip-audit --fix --dry-run
lint-gitlab-pipeline:
yamllint .gitlab-ci.yml
lint:
flake8 \
--ignore W191,E211,E128,E203,E124,F541,E402,E251,W504,W503 \
"$(PROJECT_DIR)/src/piper_whistle"
readme-build:
python3 tmplr build-readme \
"$(PROJECT_DIR)/etc/readme.md.tmpl" \
"$(PROJECT_DIR)/readme.md"
docs-build: readme-build
python3 tmplr build-docs-cfg \
"$(PROJECT_DIR)/etc/docs.cfg.tmpl" \
"$(PROJECT_DIR)/docs/docs.cfg"
make -C docs
run-tests:
python3 -m unittest $(PROJECT_DIR)/src/testing/functional.py
venv-setup:
python3 -m venv .
venv-clean:
rm -rf bin build dist include lib lib64 piper_whistle.egg-info pyvenv.cfg share
venv-deactivate:
$(shell declare -f deactivate && deactivate)
build-wheel:
python3 "$(PROJECT_DIR)/setup.py" bdist_wheel
pip-update-pip:
python3 -m pip install -U pip
pip-install-dev:
python3 -m pip install -r requirements.dev.txt
pip-install-runtime:
python3 -m pip install -r requirements.txt
pip-update-all: pip-update-pip pip-install-dev pip-install-runtime
release:
mkdir -p "$(PROJECT_DIR)/build/release"
# https://github.com/pypa/setuptools/issues/3000
# Add -n to allow build to use current package env
PYTHONPATH=$(PWD) python3 -m build -s -n -w -o "$(PROJECT_DIR)/build/release"
pypi-test:
$(PROJECT_DIR)/etc/./upload-pypi.sh \
testpypi test.pypi.cfg "$(PROJECT_DIR)/build/release"/*
pypi:
$(PROJECT_DIR)/etc/./upload-pypi.sh \
pypi pypi.cfg "$(PROJECT_DIR)/build/release"/*
version:
@python3 -m src.piper_whistle.version