forked from trec-kba/kba-corpus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (43 loc) · 1.57 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
all: clean
tar cf kba_corpus.tar --exclude ".git" kba_corpus.py argparse.py kba_thrift thrift
# trec-kba-rsa.secret-key is NOT part of this git repo, and
# anyone who has it has signed agreements with NIST promising
# to protect it from dissemination
tar rf kba_corpus.tar ../trec-kba-rsa.secret-key
gzip kba_corpus.tar
clean:
rm -f kba_corpus.tar.gz
clean_thrift:
rm -rf kba_thrift_v1_1
rm -rf gen-py
thrift: clean_thrift
thrift --gen py kba-v1.1.thrift
mv gen-py/kba kba_thrift_v1_1
rm -rf gen-py
clean_streamcorpus:
rm -rf gen-py
rm -f src/streamcorpus/ttypes.py
rm -f src/streamcorpus/constants.py
rm -rf build dist
.PHONY : build
build: clean_streamcorpus
## The 'right' thing to do here is apparently to use the
## 'namespace' functionality in python setup tools. However,
## this is not yet adopted into core python and has some
## kludgy sounding stuff about using __init__.py for the sole
## purpose of causing (tricking?) python to looking further
## through sys.path if it fails to find a component in the
## first module with the requested name. Instead of taking a
## depency on that, we maintain control of the kludge here in
## this Makefile by copying the code files generated by
## thrift into our working tree and not the empty __init__.py
## files from thrift.
thrift --gen py src/streamcorpus.thrift
cp gen-py/streamcorpus/constants.py src/streamcorpus/.
cp gen-py/streamcorpus/ttypes.py src/streamcorpus/.
rm -rf gen-py
install: build
python setup.py install
build_packages: build
python setup.py bdist_egg
python setup.py bdist_rpm