Commit db39cd9c authored by Yuanle Song's avatar Yuanle Song
Browse files

v2.0.3 use PYPI_MIRROR when building wheels

parent e941df9b
Loading
Loading
Loading
Loading
+31 −1
Original line number Diff line number Diff line
* 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.
+1 −1
Original line number Diff line number Diff line
(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"
+3 −1
Original line number Diff line number Diff line
@@ -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