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

v1.11.1 bugfix: don't use hardlink when copy

wheelhouse/ dir;

- don't rebuild wheelhouse/ if ready file exists.
  use shell if to check this.

  makefile mtime based check won't work when git checkout file is newer
  than last build's ready file.
parent 360e6496
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
(defproject python/lein-template "1.11.0"
(defproject python/lein-template "1.11.1"
  :description "lein template for a python project"
  :url "https://gitlab.emacsos.com/sylecn/python-project-template"
  :license {:name "Apache License 2.0"
+9 −8
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ shell:

$(VENV)/runtime-venv-ready: $(REQUIREMENTS)
	test -d "$(VENV)/bin" || $(DEFAULT_PYTHON) $(VIRTUALENV) --no-download -q "$(VENV)"
	@if [ -d "$(WHEELHOUSE)" ]; then \
	@if [ -e "$(WHEELHOUSE)/ready" ]; then \
		$(PIP) install -q --isolated --no-index --find-links="$(WHEELHOUSE)" -r $(REQUIREMENTS); \
	else \
		$(PIP) install -q -i $(PYPI_MIRROR) -r $(REQUIREMENTS); \
@@ -87,13 +87,14 @@ deb:
	utils/build-deb
pipfreeze:
	$(PIP) freeze
$(WHEELHOUSE)/ready: $(REQUIREMENTS)
	test -d "$(VENV)/bin" || $(DEFAULT_PYTHON) $(VIRTUALENV) --no-download -q "$(VENV)"
	@echo "building wheelhouse in $(WHEELHOUSE)..."
	$(PIP) install wheel
	$(PIP) wheel -w wheelhouse -r $(REQUIREMENTS)
	touch "$(WHEELHOUSE)/ready"
wheel: $(WHEELHOUSE)/ready
wheel: $(REQUIREMENTS)
	if [ ! -f "$(WHEELHOUSE)/ready" ]; then \
		test -d "$(VENV)/bin" || $(DEFAULT_PYTHON) $(VIRTUALENV) --no-download -q "$(VENV)"; \
		@echo "building wheelhouse in dir $(WHEELHOUSE)..."; \
		$(PIP) install wheel; \
		$(PIP) wheel -w $(WHEELHOUSE) -r $(REQUIREMENTS); \
		touch "$(WHEELHOUSE)/ready"; \
	fi
check: just-test
sanity-check: bootstrap
	$(PYTHON) {{python-pkg-name}}/sanity_check.py
+5 −1
Original line number Diff line number Diff line
@@ -13,10 +13,14 @@ build_dest_dir() {
	fi
	rm -rf "$DEST"
	mkdir -p "${DEST}${DEST_DIR}"
	for f in Makefile README.rst setup.py requirements*.txt wheelhouse conf $PYTHON_MODULES
	for f in Makefile README.rst setup.py requirements*.txt conf $PYTHON_MODULES
	do
		cp -al "$PWD/$f" "${DEST}${DEST_DIR}/$f"
	done
	# in docker based build, wheelhouse/ could be in a different device,
	# can't use hard link.
	cp -ar "$PWD/wheelhouse" "${DEST}${DEST_DIR}/"

	# mkdir -p ${DEST}/etc/systemd/system/
	# cp $PWD/conf/web.service ${DEST}/etc/systemd/system/{{name}}.service