From 99ece486173ec319d3d9d16fcfa7a4193fb12ad9 Mon Sep 17 00:00:00 2001 From: Yuanle Song Date: Fri, 16 Dec 2016 14:00:15 +0800 Subject: [PATCH] v0.17.0 add "make test-prod" bugfix: updated yygame-utils version to 0.17.1, makes it work on some early 2.7.x version. --- project.clj | 2 +- src/leiningen/new/python/Makefile | 9 +++++++-- src/leiningen/new/python/requirements.txt | 2 +- src/leiningen/new/python/utils/build-deb | 3 ++- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/project.clj b/project.clj index 9d304ac..0e674df 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 044b863..081fdd1 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 b6acdd3..bb75835 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 074c18d..7605659 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 -- GitLab