-
Notifications
You must be signed in to change notification settings - Fork 23
/
Makefile
86 lines (73 loc) · 2.15 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
75
76
77
78
79
80
81
82
83
84
85
86
SHELL := /bin/bash
PKG := noaadata
VERSION := ${shell cat noaadata/__init__.py | grep version | cut -d\' -f2}
default:
@echo
@echo " *** Welcome to ${PKG}-py ${VERSION} ***"
@echo
@echo " NOAA Co-ops and AIS"
@echo " Python Library"
@echo
@echo " clean - Remove temporary files"
@echo " test - Run the unittests"
@echo " check - Look for rough spots"
@echo " sdist - Build a source distribution tar ball"
@echo
@echo " WARNING: this Makefile is for the maintainer. See INSTALL"
.PHONY: clean
clean:
rm -f ${PKG}-py.info MANIFEST
find . -name \*.pyc | xargs rm -f
find . -name \*~ | xargs rm -f
find . -name .DS_Store | xargs rm -f
cd ${PKG} && make clean
.PHONY: real-clean
real-clean: clean
rm -f MANIFEST [0-9]*.html *.info
rm -rf build dist
rm -rf html*
rm -f 8*.{ais,txt,html} current.ais all.ais
find . -name .DS_Store | xargs rm
.PHONY: test tests
test:
cd test && make test
cd ${PKG} && make test
@echo
@echo "All tests passed! (Except those that are known to fail.)"
.PHONY: check
check:
@grep -n FIX Makefile */Makefile | grep -v grep
@grep -n FIX */*.py
@echo
pychecker ${PKG}
find . -name \*.py | xargs egrep '@(todo|bug)'
sdist: test
@echo
@echo Building a source distribution...
@echo
(cd ais; make)
(cd ais/sls; make)
(cd ais/ris; make)
-find . -name \*.pyc | xargs rm
rm -f MANIFEST
./setup.py sdist --formats=bztar
DIST_TAR=dist/${PKG}-py-${VERSION}.tar.bz2
fink: ${PKG}-py.info
.PHONY: ${PKG}-py.info
${PKG}-py.info: ${PKG}-py.info.in Makefile #${DIST_TAR}
perl -p -e "s/\@VERSION\@/${VERSION}/g" $< > fink.tmp
MD5=`md5 dist/${PKG}-py-${VERSION}.tar.bz2| awk '{print $$4}'` \
&& perl -p -e "s/\@MD5\@/$$MD5/g" fink.tmp > $@
rm -f fink.tmp
.PHONY: install-fink
install-fink: ${PKG}-py.info ${DIST_TAR} dist/${PKG}-py-${VERSION}.tar.bz2
cp ${PKG}-py.info /sw/fink/10.10/local/main/finkinfo/libs/pythonmods/
cp ${DIST_TAR} /sw/src
fink rebuild ${PKG}-py27
upload:
scp ${PKG}-py.info ${DIST_TAR} vislab-ccom:www/software/noaadata/downloads/
scp ChangeLog.html vislab-ccom:www/software/noaadata/
register:
./setup.py register
upload-pypi:
python setup.py sdist --formats=bztar upload