forked from reddit/baseplate.py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
63 lines (48 loc) · 1.56 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
55
56
57
58
59
60
61
62
63
all: thrift build
THRIFT=thrift1
THRIFT_OPTS=-strict -gen py:utf8strings,slots,new_style
THRIFT_BUILDDIR=build/thrift
THRIFT_SOURCE=baseplate/thrift/baseplate.thrift tests/integration/test.thrift
THRIFT_BUILDSTAMPS=$(patsubst %,$(THRIFT_BUILDDIR)/%_buildstamp,$(THRIFT_SOURCE))
thrift: $(THRIFT_BUILDSTAMPS)
# we use a python namespace which causes a whole bunch of extra nested
# directories that we want to get rid of
$(THRIFT_BUILDDIR)/baseplate/thrift/baseplate.thrift_buildstamp: baseplate/thrift/baseplate.thrift
@echo SPECIAL $< $@
mkdir -p $(THRIFT_BUILDDIR)/$<
$(THRIFT) $(THRIFT_OPTS) -out $(THRIFT_BUILDDIR)/$< $<
cp -r $(THRIFT_BUILDDIR)/$</baseplate/thrift/ baseplate/
touch $@
$(THRIFT_BUILDDIR)/tests/integration/test.thrift_buildstamp: tests/integration/test.thrift
@echo SPECIAL $< $@
mkdir -p $(THRIFT_BUILDDIR)/$<
$(THRIFT) $(THRIFT_OPTS) -out $(THRIFT_BUILDDIR)/$< $<
cp -r $(THRIFT_BUILDDIR)/$</test tests/integration/test_thrift
touch $@
build:
python2 setup.py build
python3 setup.py build
docs:
sphinx-build -M html docs/ build/
spelling:
sphinx-build -M spelling docs/ build/
clean:
-rm -rf build/
-rm -rf tests/integration/test_thrift/
realclean: clean
-rm -rf baseplate.egg-info/
tests:
nosetests
nosetests3
sphinx-build -M doctest docs/ build/
sphinx-build -M spelling docs/ build/
develop:
python2 setup.py develop
python3 setup.py develop
install:
python2 setup.py install
python3 setup.py install
lint:
flake8 baseplate/
pylint --errors-only baseplate/
.PHONY: docs spelling clean realclean tests develop install build lint