-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
27 lines (20 loc) · 953 Bytes
/
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
# https://www.gnu.org/software/make/manual/html_node/Special-Variables.html
# https://ftp.gnu.org/old-gnu/Manuals/make-3.80/html_node/make_17.html
PROJECT_MKFILE_PATH := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
PROJECT_MKFILE_DIR := $(shell cd $(shell dirname $(PROJECT_MKFILE_PATH)); pwd)
PROJECT_NAME := openapi_type
PROJECT_ROOT := $(PROJECT_MKFILE_DIR)
BUILD_DIR := $(PROJECT_ROOT)/build
DIST_DIR := $(PROJECT_ROOT)/dist
PROJECT=openapi_type
test: typecheck
pytest -s --cov=openapi_type --cov-report xml $(PROJECT_ROOT)/tests
typecheck:
mypy --config-file setup.cfg --package $(PROJECT_NAME)
publish: test
rm -rf $(BUILD_DIR) $(DIST_DIR)
python $(PROJECT_ROOT)/setup.py sdist bdist_wheel
twine upload $(DIST_DIR)/*
shell:
# pyopenssl on m1 issue https://github.com/NixOS/nixpkgs/issues/175875
NIXPKGS_ALLOW_BROKEN=1 nix-shell $(PROJECT_ROOT)/shell.nix