-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
executable file
·100 lines (78 loc) · 2.77 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
# Git variables
GIT_REPOSITORY_NAME := $(shell basename `git rev-parse --show-toplevel`)
GIT_VERSION := $(shell git describe --always --tags --long --dirty | sed -e 's/\-0//' -e 's/\-g.......//')
TARGET_DIRECTORY := ./dist
# -----------------------------------------------------------------------------
# The first "make" target runs as default.
# -----------------------------------------------------------------------------
.PHONY: default
default: help
# -----------------------------------------------------------------------------
# build
# -----------------------------------------------------------------------------
.PHONY: package
package: clean
python3 -m build
# -----------------------------------------------------------------------------
# publish
# -----------------------------------------------------------------------------
.PHONY: publish-test
publish-test: package
python3 -m twine upload --repository testpypi dist/*
.PHONY: publish-signed
publish-signed: package
python3 -m twine upload --sign --identity "Senzing, Inc." dist/*
# -----------------------------------------------------------------------------
# install
# -----------------------------------------------------------------------------
.PHONY: install
install:
pip3 install senzing-ce
.PHONY: install-dependencies
install-dependencies:
python3 -m pip install \
--upgrade \
build \
pip \
setuptools \
twine \
wheel
.PHONY: install-file
install-file: package
pip3 install \
--no-index \
--find-links dist/ \
--force-reinstall \
senzing-ce
.PHONY: install-test
install-test:
pip3 install \
--index-url https://test.pypi.org/simple/ \
--no-deps \
senzing-ce
# -----------------------------------------------------------------------------
# test
# -----------------------------------------------------------------------------
.PHONY: test
test:
tests/test-imports.py
tests/test-g2engineflags.py
# -----------------------------------------------------------------------------
# uninstall
# -----------------------------------------------------------------------------
.PHONY: uninstall
uninstall:
pip3 uninstall -y senzing-ce
# -----------------------------------------------------------------------------
# Clean up targets
# -----------------------------------------------------------------------------
.PHONY: clean
clean:
@rm -rf $(TARGET_DIRECTORY) || true
# -----------------------------------------------------------------------------
# Help
# -----------------------------------------------------------------------------
.PHONY: help
help:
@echo "List of make targets:"
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$' | xargs