From 3a9a327957c6966766c13e4b79b20a515fb0cfd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E6=AA=8E?= Date: Sun, 5 Mar 2017 15:43:56 +0800 Subject: [PATCH] Fix build script --- .travis.yml | 7 +++++++ build.sh | 17 ++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c8115603..7fa2b4c6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,13 @@ python: # - "3.7-dev" # 3.7 development branch # - "nightly" # currently points to 3.7-dev +matrix: + include: + - python: "2.7" + env: PVERSION=2 + - python: "3.6" + env: PVERSION=3 + install: false branches: diff --git a/build.sh b/build.sh index 1b051883..bd0ff5b0 100755 --- a/build.sh +++ b/build.sh @@ -1,4 +1,5 @@ #!/bin/sh +if [[$PVERSION=2]]; then python -m py_compile cps.py python -m py_compile cps/book_formats.py python -m py_compile cps/db.py @@ -8,4 +9,18 @@ python -m py_compile cps/helper.py python -m py_compile cps/ub.py python -m py_compile cps/uploader.py python -m py_compile cps/web.py -python -m py_compile cps.py +python -m py_compile cps.py +fi +f [[$PVERSION=3]]; then +python3.6 -m py_compile cps.py +python3.6 -m py_compile cps/book_formats.py +python3.6 -m py_compile cps/db.py +python3.6 -m py_compile cps/epub.py +python3.6 -m py_compile cps/fb2.py +python3.6 -m py_compile cps/helper.py +python3.6 -m py_compile cps/ub.py +python3.6 -m py_compile cps/uploader.py +python3.6 -m py_compile cps/web.py +python3.6 -m py_compile cps.py +fi +