-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathMakefile
55 lines (44 loc) · 1.12 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
# Makefile for installing and testing PyWeather
#
# Author: Patrick C. McGinty
# Date: Thursday, June 10 2010
NAME=weather
VER=$(shell python -c 'import weather;print weather.__version__')
DIST_DIR=dist
TAR=${DIST_DIR}/${NAME}-${VER}.tar.gz
SRC_DIR=${DIST_DIR}/${NAME}-${VER}
.PHONY: help
help:
@echo "The following targets are defined:"
@echo ""
@echo " clean remove tmp files"
@echo " dist create distribution archive file"
@echo " help print usage instructions for the Makefile"
@echo " install install program into system dirs"
@echo " test execute all unit tests"
@echo " release perform a full test/dist/install"
@echo " register update the PyPI registration"
@echo ""
.PHONY: test
test:
nosetests
.PHONY: install
install:
python setup.py install
.PHONY: clean
clean:
python setup.py clean
.PHONY: dist
dist:
python setup.py sdist --force-manifest
make clean
.PHONY: dist-test
dist-test:
tar xzf ${TAR} -C ${DIST_DIR}
sudo make -C ${SRC_DIR} install
sudo rm -rf ${SRC_DIR}
.PHONY: release
release: test dist dist-test
.PHONY: register
register:
python setup.py register