Skip to content

Commit

Permalink
crossenv.mk: Use $(WORK_DIR)/pip caching dir for crossenv creation
Browse files Browse the repository at this point in the history
  • Loading branch information
th0ma7 committed Nov 26, 2024
1 parent d7edc67 commit 708218a
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions mk/spksrc.crossenv.mk
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,12 @@ endif
crossenv_msg_target:
@$(MSG) "Preparing crossenv for $(NAME)"

# Create per-arch caching directory:
# PIP_CACHE_DIR defaults to $(WORK_DIR)/pip
pre_crossenv_target: crossenv_msg_target
@if [ -n "$(PIP_CACHE_OPT)" ] ; then \
mkdir -p $(PIP_CACHE_DIR) ; \
fi; \

post_crossenv_target: $(CROSSENV_TARGET)

Expand Down Expand Up @@ -221,15 +226,15 @@ endif
$(RUN) $$(which cross-python) $(CROSSENV_PATH)/build/get-pip.py $(CROSSENV_DEFAULT_PIP) --no-setuptools --no-wheel --disable-pip-version-check
@. $(CROSSENV_PATH)/bin/activate ; \
$(MSG) build-pip Install $(CROSSENV_DEFAULT_SETUPTOOLS) $(CROSSENV_DEFAULT_WHEEL) ; \
$(RUN) $$(which build-pip) --disable-pip-version-check install $(CROSSENV_DEFAULT_SETUPTOOLS) $(CROSSENV_DEFAULT_WHEEL) ; \
$(RUN) $$(which build-pip) --cache-dir $(PIP_CACHE_DIR) --disable-pip-version-check install $(CROSSENV_DEFAULT_SETUPTOOLS) $(CROSSENV_DEFAULT_WHEEL) ; \
$(MSG) cross-pip Install $(CROSSENV_DEFAULT_SETUPTOOLS) $(CROSSENV_DEFAULT_WHEEL) ; \
$(RUN) $$(which cross-pip) --disable-pip-version-check install $(CROSSENV_DEFAULT_SETUPTOOLS) $(CROSSENV_DEFAULT_WHEEL)
$(RUN) $$(which cross-pip) --cache-dir $(PIP_CACHE_DIR) --disable-pip-version-check install $(CROSSENV_DEFAULT_SETUPTOOLS) $(CROSSENV_DEFAULT_WHEEL)
@$(MSG) [$(CROSSENV_PATH)] Processing $(CROSSENV_BUILD_REQUIREMENTS)
@. $(CROSSENV_PATH)/bin/activate ; \
$(MSG) build-pip install -r $(CROSSENV_BUILD_REQUIREMENTS) ; \
$(RUN) $$(which build-pip) --disable-pip-version-check install -r $(CROSSENV_BUILD_REQUIREMENTS) ; \
$(RUN) $$(which build-pip) --cache-dir $(PIP_CACHE_DIR) --disable-pip-version-check install -r $(CROSSENV_BUILD_REQUIREMENTS) ; \
$(MSG) cross-pip Install -r $(CROSSENV_BUILD_REQUIREMENTS) ; \
$(RUN) $$(which cross-pip) --disable-pip-version-check install -r $(CROSSENV_BUILD_REQUIREMENTS)
$(RUN) $$(which cross-pip) --cache-dir $(PIP_CACHE_DIR) --disable-pip-version-check install -r $(CROSSENV_BUILD_REQUIREMENTS)
#ifneq ($(PYTHON_LIB_NATIVE),$(PYTHON_LIB_CROSS))
# cp $(PYTHON_LIB_CROSS)/_sysconfigdata_*.py $(PYTHON_LIB_NATIVE)/_sysconfigdata.py
#endif
Expand Down

0 comments on commit 708218a

Please sign in to comment.