-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
54 lines (49 loc) · 1.5 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
INSTALL_DIR=/opt/research
VENV_DIR=venv
BIN=/usr/local/bin
PEEK=rspeek
FLIP=rsflip
READD=rsreadd
FINDD=rsfindd
QPQT=qpqt
PDSQL=pdsql
PQTUNION=parquet-union
build: *
rm -rf ./env
conda create --yes -p ./env python=3.6 nltk numpy pandas cython llvmlite numba thriftpy=0.3.9
./env/bin/python setup.py install
.PHONY: install
install:
mkdir -p $(INSTALL_DIR)
cp -r env/* $(INSTALL_DIR)
cp bin/* $(INSTALL_DIR)/bin
# rspeek
echo "$(INSTALL_DIR)/bin/python $(INSTALL_DIR)/bin/peek.py \$$@" > $(BIN)/$(PEEK)
chmod a+x $(BIN)/$(PEEK)
# rsflip
echo "$(INSTALL_DIR)/bin/python $(INSTALL_DIR)/bin/flip.py \$$@" > $(BIN)/$(FLIP)
chmod a+x $(BIN)/$(FLIP)
# rsreadd
echo "$(INSTALL_DIR)/bin/python $(INSTALL_DIR)/bin/readd.py \$$@" > $(BIN)/$(READD)
chmod a+x $(BIN)/$(READD)
# rsreadd
echo "$(INSTALL_DIR)/bin/python $(INSTALL_DIR)/bin/findd.py \$$@" > $(BIN)/$(FINDD)
chmod a+x $(BIN)/$(FINDD)
# qpqt
echo "$(INSTALL_DIR)/bin/python $(INSTALL_DIR)/bin/qpqt.py \$$@" > $(BIN)/$(QPQT)
chmod a+x $(BIN)/$(QPQT)
# pdsql
echo "#!$(INSTALL_DIR)/bin/python" > $(BIN)/$(PDSQL)
cat $(INSTALL_DIR)/bin/pdsql.py >> $(BIN)/$(PDSQL)
chmod a+x $(BIN)/$(PDSQL)
# parquet-union
echo "#!$(INSTALL_DIR)/bin/python" > $(BIN)/$(PQTUNION)
cat $(INSTALL_DIR)/bin/pdsql.py >> $(BIN)/$(PQTUNION)
chmod a+x $(BIN)/$(PQTUNION)
.PHONY: uninstall
uninstall:
rm -rf $(INSTALL_DIR)
rm -f $(BIN)/$(PEEK) $(BIN)/$(FLIP) $(BIN)/$(READD) $(BIN)/$(FINDD) $(BIN)/$(QPQT) $(BIN)/$(PDSQL)
.PHONY: clean
clean:
rm -rf env build ReSearch.egg-info