diff --git a/make/environment-host.mk b/make/environment-host.mk index 40592cd8..01452b98 100644 --- a/make/environment-host.mk +++ b/make/environment-host.mk @@ -53,21 +53,3 @@ HOSTRANLIB := $(shell which $(HOSTRANLIB) || type -p $(HOSTRANLIB) || echo ranli export HOSTAR HOSTAS HOSTCC HOSTCXX HOSTLD export HOSTCC_NOCCACHE HOSTCXX_NOCCACHE - -# ----------------------------------------------------------------------------- - -HOST_PYTHON_BUILD = \ - CC="$(HOSTCC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - LDSHARED="$(HOSTCC) -shared" \ - PYTHONPATH=$(HOST_DIR)/$(HOST_PYTHON3_LIB_DIR)/site-packages \ - $(HOST_DIR)/bin/python3 ./setup.py build --executable=/usr/python - -HOST_PYTHON_INSTALL = \ - CC="$(HOSTCC)" \ - CFLAGS="$(CFLAGS)" \ - LDFLAGS="$(LDFLAGS)" \ - LDSHARED="$(HOSTCC) -shared" \ - PYTHONPATH=$(HOST_DIR)/$(HOST_PYTHON3_LIB_DIR)/site-packages \ - $(HOST_DIR)/bin/python3 ./setup.py install --root=$(HOST_DIR) --prefix= diff --git a/package/Makefile.in b/package/Makefile.in index 3bf73b7e..5638855d 100644 --- a/package/Makefile.in +++ b/package/Makefile.in @@ -27,3 +27,4 @@ MAKEFLAGS += --no-print-directory include package/pkg-autotools.mk include package/pkg-cmake.mk +include package/pkg-python.mk diff --git a/package/pkg-python.mk b/package/pkg-python.mk new file mode 100644 index 00000000..1da0e485 --- /dev/null +++ b/package/pkg-python.mk @@ -0,0 +1,37 @@ +################################################################################ +# +# Python packages +# +################################################################################ + +HOST_PYTHON3_BUILD = \ + CC="$(HOSTCC)" \ + CFLAGS="$(HOST_CFLAGS)" \ + LDFLAGS="$(HOST_LDFLAGS)" \ + LDSHARED="$(HOSTCC) -shared" \ + PYTHONPATH=$(HOST_DIR)/$(HOST_PYTHON3_BASE_DIR)/site-packages \ + $(HOST_PYTHON3_BINARY) ./setup.py -q build --executable=/usr/python + +HOST_PYTHON3_INSTALL = \ + CC="$(HOSTCC)" \ + CFLAGS="$(HOST_CFLAGS)" \ + LDFLAGS="$(HOST_LDFLAGS)" \ + LDSHARED="$(HOSTCC) -shared" \ + PYTHONPATH=$(HOST_DIR)/$(HOST_PYTHON3_BASE_DIR)/site-packages \ + $(HOST_PYTHON3_BINARY) ./setup.py -q install --root=$(HOST_DIR) --prefix= + +#define python3-package +# $(call PREPARE) +# $(CHDIR)/$($(PKG)_DIR); \ +# $(PYTHON3_BUILD); \ +# $(PYTHON3_INSTALL) +# $(call TARGET_FOLLOWUP) +#endef + +define host-python3-package + $(call PREPARE) + $(CHDIR)/$($(PKG)_DIR); \ + $(HOST_PYTHON3_BUILD); \ + $(HOST_PYTHON3_INSTALL) + $(call HOST_FOLLOWUP) +endef