forked from davvid/python-jsonrpc
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathMakefile
executable file
·53 lines (41 loc) · 1.24 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
#!/usr/bin/env make
PYTHON ?= python
prefix ?= $(shell pf-makevar --absolute root)
ifeq ($(mac_pkg),1)
mac_flags=--mac-pkg
endif
pfmakevar ?= pf-makevar --root=$(prefix) --absolute $(mac_flags)
pylibs ?= $(shell $(pfmakevar) python-site)
rsync ?= rsync -r --delete --exclude=_tests --exclude='*.swp' --exclude='*~'
nose_args=--no-path-adjustment --with-doctest
test_flags=
release_flags=
-include config.mak
# test flags can be specified on the command line for passing
# extra arguments to nose. You can also add a 'config.mak'
# in this same directory to redefine these variables as needed.
all: install
makevars:
@(test -n "$(prefix)" && \
test -n "$(pylibs)") || \
(echo "error: undefined build variables: is pathfinder installed?"; \
false)
libs: makevars
mkdir -p $(DESTDIR)$(pylibs)
$(rsync) jsonrpc/ $(DESTDIR)$(pylibs)/jsonrpc/
find $(DESTDIR)$(pylibs)/ -name '*.py' | xargs $(PYTHON) -m py_compile
install: libs
pkg:
git make-pkg
rpm:
git make-rpm
clean: makevars
rm -rf $(DESTDIR)$(pylibs)/jsonrpc
rmdir -p $(DESTDIR)$(pylibs) 2>/dev/null || true
find . -name '*.py[co]' -print0 | xargs -0 rm -f
test:
@env PYTHONPATH="$(CURDIR)":"$(PYTHONPATH)" \
./run-tests.py
.PHONY: test install clean makevars
.PHONY: rpm
.PHONY: pkg