-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathMakefile
51 lines (36 loc) · 899 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# -*- makefile -*-
.PHONY: main clean test pip shafts
# OS-specific configurations
ifeq ($(OS),Windows_NT)
PYTHON_exe = ${CONDA}/bin/python.exe
else
UNAME_S := $(shell uname -s)
ifeq ($(UNAME_S),Linux) # Linux
PYTHON_exe = ${CONDA}/bin/python
endif
ifeq ($(UNAME_S),Darwin) # macOS
PYTHON_exe = ${CONDA}/bin/python
endif
endif
src_dir = src
PYTHON := $(if $(PYTHON_exe),$(PYTHON_exe),python)
# All the files which include modules used by other modules (these therefore
# need to be compiled first)
MODULE = shafts
# build wheel and install the package
pip:
conda init bash
$(MAKE) -C $(src_dir) pip
wheel:
conda init bash
$(MAKE) -C $(src_dir) main
# house cleaning
clean:
$(MAKE) -C $(src_dir) clean
# install package in dev mode and do pytest
test:
conda init bash
$(MAKE) -C $(src_dir) test
# upload wheels to pypi using twine
upload:
$(MAKE) -C $(src_dir) upload