diff --git a/project.clj b/project.clj index 9d304ac64e35a49b26440b7838485ff09d7caeb8..0e674dfe3904b84769a217c7d8151ee2bf0ed298 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject python/lein-template "0.16.3" +(defproject python/lein-template "0.17.0" :description "lein template for a python project" :repositories [["snapshots" {:url "http://devserv.game.yy.com/nexus/content/repositories/snapshots" diff --git a/src/leiningen/new/python/Makefile b/src/leiningen/new/python/Makefile index 044b863ef9578d460bbf08fa30f7b25d6118c8e9..081fdd1e8e6a638e2d42a0a79c9979b38d7bc726 100644 --- a/src/leiningen/new/python/Makefile +++ b/src/leiningen/new/python/Makefile @@ -11,6 +11,7 @@ DEFAULT_PYTHON := $(shell ./utils/choose_default_python.py) VIRTUALENV := ./utils/virtualenv-15.0.2/virtualenv.py REQUIREMENTS := -r requirements.txt +DEV_REQUIREMENTS := -r requirements-dev.txt default: check-coding-style build: @@ -38,7 +39,7 @@ logdir: sudo chown -R ${USER} /var/log/{{name}}; \ fi bootstrap: venv requirements -bootstrap-dev: REQUIREMENTS += -r requirements-dev.txt +bootstrap-dev: REQUIREMENTS += $(DEV_REQUIREMENTS) bootstrap-dev: venv requirements logdir install: bootstrap $(PYTHON) setup.py -q install @@ -67,6 +68,10 @@ test: check-coding-style just-test: $(PYTEST) $(PYTHON_MODULES) +install-dev-no-wheel: + $(PIP) install -q -i https://pypi.tuna.tsinghua.edu.cn/simple -f https://emacsos.com/python/packages/ $(DEV_REQUIREMENTS) +test-prod: install-dev-no-wheel test + clean: find . -name "__pycache__" -type d -exec rm -rf {} \; || true find . -name "*.pyc" -type f -exec rm -rf {} \; || true @@ -84,4 +89,4 @@ install-git-hooks-force: loc: find . -regex '.*\.pyw?$$' -exec wc -l {} \+ | tail -n 1 which cloc >/dev/null && cloc {{name}}/ -.PHONY: default build debug run uwsgi shell venv bootstrap bootstrap-dev install uninstall deb pipfreeze wheel check check-coding-style pylint-full test clean full-clean TAGS update-git-hooks install-git-hooks install-git-hooks-force loc +.PHONY: default build debug run uwsgi shell venv bootstrap bootstrap-dev install uninstall deb pipfreeze wheel check check-coding-style pylint-full test just-test test-prod clean full-clean TAGS update-git-hooks install-git-hooks install-git-hooks-force loc diff --git a/src/leiningen/new/python/requirements.txt b/src/leiningen/new/python/requirements.txt index b6acdd3116fbbceaff052d42617df007fc0b122a..bb758354243aa9b6ed70bddc4572e76c9c8ce8c7 100644 --- a/src/leiningen/new/python/requirements.txt +++ b/src/leiningen/new/python/requirements.txt @@ -1,2 +1,2 @@ -yygame-utils==0.16.0 +yygame-utils==0.17.1 # raven==3.6.1 diff --git a/src/leiningen/new/python/utils/build-deb b/src/leiningen/new/python/utils/build-deb index 074c18d444f4b3dd6db3385d7c7361d20c33fca9..76056594539472120e8f9e409b2c4c88445e6862 100644 --- a/src/leiningen/new/python/utils/build-deb +++ b/src/leiningen/new/python/utils/build-deb @@ -22,6 +22,7 @@ if [ ! -d wheelhouse ]; then make wheel fi +# add dependencies on libpq5 if you use psycopg2. fpm -t deb -s dir -n "$PKG_NAME" -v "$VERSION" --prefix "$DEST_DIR" -f \ --depends make \ -x '*__pycache__' \ @@ -31,5 +32,5 @@ fpm -t deb -s dir -n "$PKG_NAME" -v "$VERSION" --prefix "$DEST_DIR" -f \ --before-install deb-scripts/before-install.sh \ --after-install deb-scripts/after-install.sh \ --before-remove deb-scripts/before-remove.sh \ - Makefile README.rst setup.py utils requirements.txt wheelhouse conf \ + Makefile README.rst setup.py utils requirements*.txt wheelhouse conf \ $PYTHON_MODULES