-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathMakefile
More file actions
37 lines (27 loc) · 865 Bytes
/
Makefile
File metadata and controls
37 lines (27 loc) · 865 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
28
29
30
31
32
33
34
35
36
37
PYTHON ?= python3
OPENSSL ?= openssl
SERVER_CERT := tests/server.pem
all: build
$(PYTHON) -m doctest ./customerio/__init__.py
install:
$(PYTHON) -m pip install .
clean:
rm -rf MANIFEST build dist customerio.egg-info .ruff_cache
dev: clean all
if ! pip uninstall customerio; then echo "customerio not installed, installing it for the first time" ; fi
pip install dist/*
$(PYTHON) -i -c "from customerio import *"
upload:
$(PYTHON) -m twine upload dist/*
build:
$(PYTHON) -m build
lint:
$(PYTHON) -m ruff check .
$(PYTHON) -m ruff format --check .
format:
$(PYTHON) -m ruff check --fix .
$(PYTHON) -m ruff format .
test: $(SERVER_CERT)
$(PYTHON) -m unittest discover -v
$(SERVER_CERT):
$(OPENSSL) req -new -newkey rsa:2048 -days 10 -nodes -x509 -subj "/C=CA/ST=Ontario/L=Toronto/O=Test/CN=127.0.0.1" -keyout $(SERVER_CERT) -out $(SERVER_CERT)