@@ -236,9 +236,10 @@ endif
define PYTHON_CREATE_PYC_FILES
PYTHONPATH="$(PYTHON_PATH)" \
- $(HOST_DIR)/usr/bin/python$(PYTHON_VERSION_MAJOR) \
- support/scripts/pycompile.py $(if $(BR2_REPRODUCIBLE),--force) \
- $(TARGET_DIR)/usr/lib/python$(PYTHON_VERSION_MAJOR)
+ cd $(TARGET_DIR) && $(HOST_DIR)/usr/bin/python$(PYTHON_VERSION_MAJOR) \
+ $(TOPDIR)/support/scripts/pycompile.py \
+ $(if $(BR2_REPRODUCIBLE),--force) \
+ usr/lib/python$(PYTHON_VERSION_MAJOR)
endef
ifeq ($(BR2_PACKAGE_PYTHON_PYC_ONLY)$(BR2_PACKAGE_PYTHON_PY_PYC),y)