forked from sartography/SpiffWorkflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
74 lines (62 loc) · 1.85 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
64
65
66
67
68
69
70
71
72
73
74
NAME=SpiffWorkflow
VERSION=`python setup.py --version`
PREFIX=/usr/local/
BIN_DIR=$(PREFIX)/bin
SITE_DIR=$(PREFIX)`python -c "import sys; from distutils.sysconfig import get_python_lib; print get_python_lib()[len(sys.prefix):]"`
###################################################################
# Standard targets.
###################################################################
.PHONY : clean
clean:
find . -name "*.pyc" -o -name "*.pyo" | xargs -rn1 rm -f
find . -name "*.egg-info" | xargs -rn1 rm -r
rm -Rf build
cd doc; make clean
.PHONY : dist-clean
dist-clean: clean
rm -Rf dist
.PHONY : doc
doc:
cd doc; make
install:
mkdir -p $(SITE_DIR)
./version.sh
export PYTHONPATH=$(SITE_DIR):$(PYTHONPATH); \
python setup.py install --prefix $(PREFIX) \
--install-scripts $(BIN_DIR) \
--install-lib $(SITE_DIR)
./version.sh --reset
uninstall:
# Sorry, Python's distutils support no such action yet.
.PHONY : tests
tests:
cd tests/$(NAME); \
[ -e run_suite.* ] && ./run_suite.* || [ ! -e run_suite.* ]
###################################################################
# Package builders.
###################################################################
targz: clean
./version.sh
python setup.py sdist --formats gztar
./version.sh --reset
tarbz: clean
./version.sh
python setup.py sdist --formats bztar
./version.sh --reset
wheel: clean
./version.sh
python setup.py bdist_wheel --universal
./version.sh --reset
deb: clean
./version.sh
debuild -S -sa
cd ..; sudo pbuilder build $(NAME)_$(VERSION)-0ubuntu1.dsc; cd -
./version.sh --reset
dist: targz tarbz wheel
###################################################################
# Publishers.
###################################################################
dist-publish:
./version.sh
python setup.py bdist_wheel --universal upload
./version.sh --reset