-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
36 lines (28 loc) · 844 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
28
29
30
31
32
33
34
35
36
PACKAGE_DIR = $(shell pwd)/src
PACKAGE_NAME = splintershell
DECODER_SRC_DIR = decoders
DECODER_BIN_DIR = $(PACKAGE_DIR)/$(PACKAGE_NAME)/encoding/schemes/bin
export PACKAGE_NAME
export DECODER_BIN_DIR
all: fmt lint decoders package
fmt:
isort $(PACKAGE_DIR)
black $(PACKAGE_DIR)
lint:
$(MAKE) -C $(PACKAGE_DIR)
decoders:
mkdir -p $(DECODER_BIN_DIR)
$(MAKE) -C $(DECODER_SRC_DIR)
package:
python3 setup.py sdist bdist_wheel
.PHONY: all fmt lint decoders package install clean
install: all
pip install dist/*.whl
clean:
rm -rf dist
rm -rf build
find . -type f -name *.bin -exec rm -rf {} \+ || true
find . -type f -name *.o -exec rm -rf {} \+ || true
find **/*.egg-info -type d -exec rm -rf {} \+ || true
find . -type d -name .mypy_cache -exec rm -rf {} \+ || true
find . -type d -name __pycache__ -exec rm -rf {} \+ || true