diff --git a/operational b/operational index d52945ab465dbd2ec8c589379c5edd69fdb90d25..7170f5433cb9dc4c1714812e025536165de5c3c8 100644 --- a/operational +++ b/operational @@ -1,6 +1,6 @@ * COMMENT -*- mode: org -*- #+Date: 2014-05-09 -Time-stamp: <2021-08-16> +Time-stamp: <2021-08-27> #+STARTUP: content * notes :entry: ** 2018-05-02 support test, build and deploy in gocd @@ -104,9 +104,39 @@ feature is still WIP and I won't deploy it. * current :entry: ** +** 2021-08-25 some env variable should be passed down to docker container. +for example, -e SQLALCHEMY_URL is essential for yxy-wechat. + +predefine PASS_DOWN_ENV_VARIABLES maybe. + ** 2021-08-16 support upgrading existing application's Makefile. - when run in existing dir, don't init git. just create file, let user review and do merge. +** 2021-08-25 how to make sure pip is latest without pip install -U at "make bootstrap" time? +how to not upgrade pip if it's already 19.0+? +can I use Makefile to manage the pip lib version? + +** 2021-08-24 switch to a better build system. +Makefile, scons, meson, bazel. + +Comparisons +https://mesonbuild.com/Comparisons.html + +- features + - easy to write build file. + human readable. + with proper abstraction. + - build fast. + do not do unnecessary checks. + for example, when no .py file or python venv change, pylint should not run + if there is last run cache. + when a library exists in venv, do not install it again. + when all requirements have wheels, do not try to build it again. + do not regenerate deb if nothing has changed. + + side note: I don't think I need deb when building using docker. + install via deb just slow down the build and doesn't provide much value. + - ** 2019-02-28 add support for running application test using docker-compose. see ~/websites/url-alias project for an example. diff --git a/project.clj b/project.clj index 52a97f048f85776e9f50add2cac6e4edd4aefd77..65a56c51b88b9d81fe938f3940a43f194c52dceb 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject python/lein-template "2.0.2" +(defproject python/lein-template "2.0.3" :description "lein template for a python project" :url "https://gitlab.emacsos.com/sylecn/python-project-template" :license {:name "Apache License 2.0" diff --git a/src/leiningen/new/python/Makefile b/src/leiningen/new/python/Makefile index 801d874aefa1410eafbf05318fc3e7f9c66c2b27..eb0acecb3bc1c54463e27c106debb07755c15214 100644 --- a/src/leiningen/new/python/Makefile +++ b/src/leiningen/new/python/Makefile @@ -64,8 +64,10 @@ shell: $(VENV)/runtime-venv-ready: $(REQUIREMENTS) test -d "$(VENV)/bin" || $(DEFAULT_PYTHON) -m venv "$(VENV)" @if [ -e "$(WHEELHOUSE)/ready" ]; then \ + $(PIP) install -q -i $(PYPI_MIRROR) -U pip; \ $(PIP) install -q --isolated --no-index --find-links="$(WHEELHOUSE)" -r $(REQUIREMENTS); \ else \ + $(PIP) install -q -i $(PYPI_MIRROR) -U pip; \ $(PIP) install -q -i $(PYPI_MIRROR) -r $(REQUIREMENTS); \ fi touch "$(VENV)/runtime-venv-ready" @@ -96,7 +98,7 @@ wheel: $(REQUIREMENTS) if [ ! -f "$(WHEELHOUSE)/ready" ]; then \ test -d "$(VENV)/bin" || $(DEFAULT_PYTHON) -m venv "$(VENV)" && \ echo "building wheelhouse in dir $(WHEELHOUSE)..." && \ - $(PIP) install wheel && \ + $(PIP) install -i $(PYPI_MIRROR) wheel && \ $(PIP) wheel -w $(WHEELHOUSE) -i $(PYPI_MIRROR) -r $(REQUIREMENTS) && \ touch "$(WHEELHOUSE)/ready"; \ fi