blob: 093c42aa952a001ace02aa7462ed4c6e1a1d9bc6 (
plain)
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
|
# Build the pytz libraries
#
MAKE=make
PYTHON23=python2.3
PYTHON24=python2.4
PYTHON25=python2.5
PYTHON26=python2.6
PYTHON=${PYTHON25}
OLSON=./elsie.nci.nih.gov
TESTARGS=-vv
TARGET=
#TARGET=Europe/Amsterdam Europe/Moscow W-SU Etc/GMT+2 Atlantic/South_Georgia Europe/Warsaw Europe/Vilnius
#Mideast/Riyadh87
STYLESHEET=/usr/share/python-docutils/stylesheets/default.css
all: dist
# skip test_zdump, since it fails on AMD64, and takes a long time on i386
check: test_tzinfo test_docs
dist: build/dist/locales/pytz.pot .stamp-dist
.stamp-dist: .stamp-tzinfo
cd build/dist && mkdir -p ../tarballs && \
${PYTHON} setup.py sdist --dist-dir ../tarballs \
--formats=bztar,gztar,zip && \
${PYTHON23} setup.py bdist_egg --dist-dir=../tarballs && \
${PYTHON24} setup.py bdist_egg --dist-dir=../tarballs && \
${PYTHON25} setup.py bdist_egg --dist-dir=../tarballs && \
${PYTHON26} setup.py bdist_egg --dist-dir=../tarballs
touch $@
upload: dist build/dist/locales/pytz.pot .stamp-upload
.stamp-upload: .stamp-tzinfo
cd build/dist && \
${PYTHON} setup.py register sdist \
--formats=bztar,gztar,zip --dist-dir=../tarballs \
upload --sign && \
${PYTHON23} setup.py register bdist_egg --dist-dir=../tarballs \
upload --sign && \
${PYTHON24} setup.py register bdist_egg --dist-dir=../tarballs \
upload --sign && \
${PYTHON25} setup.py register bdist_egg --dist-dir=../tarballs \
upload --sign && \
${PYTHON26} setup.py register bdist_egg --dist-dir=../tarballs \
upload --sign
touch $@
test: test_tzinfo test_docs test_zdump
clean:
rm -f .stamp-*
rm -rf build/*/*
make -C ${OLSON}/src clean
find . -name \*.pyc | xargs rm -f
test_tzinfo: .stamp-tzinfo
cd build/dist/pytz/tests \
&& ${PYTHON23} test_tzinfo.py ${TESTARGS} \
&& ${PYTHON24} test_tzinfo.py ${TESTARGS} \
&& ${PYTHON25} test_tzinfo.py ${TESTARGS} \
&& ${PYTHON26} test_tzinfo.py ${TESTARGS}
test_docs: .stamp-tzinfo
cd build/dist/pytz/tests \
&& ${PYTHON23} test_docs.py ${TESTARGS} \
&& ${PYTHON24} test_docs.py ${TESTARGS} \
&& ${PYTHON25} test_docs.py ${TESTARGS} \
&& ${PYTHON26} test_docs.py ${TESTARGS}
test_zdump: dist
${PYTHON25} gen_tests.py ${TARGET} && \
${PYTHON25} test_zdump.py ${TESTARGS}
build/dist/test_zdump.py: .stamp-zoneinfo
docs: dist
mkdir -p build/docs/source/.static
mkdir -p build/docs/built
cp src/README.txt build/docs/source/index.txt
cp conf.py build/docs/source/conf.py
sphinx-build build/docs/source build/docs/built
.stamp-tzinfo: .stamp-zoneinfo gen_tzinfo.py build/etc/zoneinfo/GMT
${PYTHON} gen_tzinfo.py ${TARGET}
rm -rf build/dist/pytz/zoneinfo
cp -a build/etc/zoneinfo build/dist/pytz/zoneinfo
touch $@
.stamp-zoneinfo:
${MAKE} -C ${OLSON}/src TOPDIR=`pwd`/build install
touch $@
build/dist/locales/pytz.pot: .stamp-tzinfo
@: #${PYTHON} gen_pot.py build/dist/pytz/locales/pytz.pot
# cd build/dist; mkdir locales; \
# pygettext --extract-all --no-location \
# --default-domain=pytz --output-dir=locales
.PHONY: all check dist test test_tzinfo test_docs test_zdump
|