-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (42 loc) · 1.14 KB
/
Makefile
File metadata and controls
52 lines (42 loc) · 1.14 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
BLK = black
MAKE = make
PIP = pip3
BASEDIR = $(CURDIR)
SRCDIR = ${BASEDIR}/fitpdf
help:
@echo 'Makefile for fitpdf'
@echo 'Usage:'
@echo 'make black reformat the code using black code formatter'
@echo 'make clean remove temporary files'
@echo 'make install install the package locally'
@echo 'make uninstall uninstall the package'
@echo 'make upload upload the distribution to PyPI'
@echo 'make uploadtest upload the distribution to TestPyPI'
black:
${BLK} *.py */*.py */*/*.py
build:
python3 -m build
clean:
rm -f ${SRCDIR}/*.pyc
rm -f ${SRCDIR}/apps/*.pyc
rm -rf ${SRCDIR}/__pycache__
rm -rf ${SRCDIR}/apps/__pycache__
rm -rf ${BASEDIR}/build
rm -rf ${BASEDIR}/dist
rm -rf ${BASEDIR}/fitpdf.egg-info
install:
${MAKE} clean
${MAKE} uninstall
${PIP} install .
${MAKE} clean
uninstall:
${PIP} uninstall --yes fitpdf
upload:
${MAKE} clean
${MAKE} build
python3 -m twine upload dist/*
uploadtest:
${MAKE} clean
${MAKE} build
python3 -m twine upload --repository testpypi dist/*
.PHONY: help black build clean install uninstall upload uploadtest