summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Bishop <stuart.bishop@canonical.com>2016-10-03 14:37:20 +0700
committerStuart Bishop <stuart.bishop@canonical.com>2016-10-03 14:37:20 +0700
commitaea262738d341cff78131934155ff9c1f84a5ac7 (patch)
treed3263b2b50615da6c1cc768e50d48f8a4561d3df
parent1254427cd5a2e75a01686f61e4e16e45f98e48a7 (diff)
downloadpytz-git-release_2016.7.tar.gz
Build tweaksrelease_2016.7
-rw-r--r--.gitignore1
-rw-r--r--Makefile7
-rw-r--r--gen_tests.py9
3 files changed, 8 insertions, 9 deletions
diff --git a/.gitignore b/.gitignore
index 6483ec3..725ae92 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,6 +7,7 @@
.stamp-zoneinfo
# For whatever reason, build/ is versioned, so the * is necessary.
build/*
+tz/version
# Generated datafile for test_zdump.py
zdump.out
diff --git a/Makefile b/Makefile
index f0b1167..ef18389 100644
--- a/Makefile
+++ b/Makefile
@@ -169,7 +169,9 @@ build/dist/locales/pytz.pot: .stamp-tzinfo
# tar xzf ../tzdata-latest.tar.gz && \
# echo Done
-sync:
+sync: _sync clean
+
+_sync:
if [ -n "$(TAG)" ]; then \
git subtree pull --prefix=tz --squash $(IANA_GIT) $(TAG) \
-m "IANA $(TAG)"; \
@@ -177,5 +179,4 @@ sync:
echo "Usage: make sync TAG=2016f"; \
fi
-
-.PHONY: all check dist test test_tzinfo test_docs test_zdump eggs wheels build
+.PHONY: all check dist test test_tzinfo test_docs test_zdump eggs wheels build clean sync _sync
diff --git a/gen_tests.py b/gen_tests.py
index 085f94d..ced9de5 100644
--- a/gen_tests.py
+++ b/gen_tests.py
@@ -27,14 +27,11 @@ def main():
# the daterange we test against - zdump understands v2 format
# files and will output historical records we can't cope with
# otherwise.
- command = '%s -v -c 1902,2038 %s' % (zdump, zone)
- process = subprocess.Popen(
- command, shell=True,
- stdin=subprocess.PIPE, stdout=subprocess.PIPE, close_fds=True)
- zd_in, zd_out = (process.stdin, process.stdout)
+ command = [zdump, '-v', '-c', '1902,2038', zone]
+ zd_out = subprocess.check_output(command)
# Skip bogus output on 64bit architectures, per Bug #213816
lines = [
- line.strip() for line in zd_out.readlines()
+ line.strip() for line in zd_out.splitlines()
if not line.decode('utf-8').strip().endswith('NULL')]
for line in lines: