Browse Source

- package: add python infrastructure

master
vanhofen 3 years ago
parent
commit
5b9e201ac6
  1. 18
      make/environment-host.mk
  2. 1
      package/Makefile.in
  3. 37
      package/pkg-python.mk

18
make/environment-host.mk

@ -53,21 +53,3 @@ HOSTRANLIB := $(shell which $(HOSTRANLIB) || type -p $(HOSTRANLIB) || echo ranli
export HOSTAR HOSTAS HOSTCC HOSTCXX HOSTLD export HOSTAR HOSTAS HOSTCC HOSTCXX HOSTLD
export HOSTCC_NOCCACHE HOSTCXX_NOCCACHE 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=

1
package/Makefile.in

@ -27,3 +27,4 @@ MAKEFLAGS += --no-print-directory
include package/pkg-autotools.mk include package/pkg-autotools.mk
include package/pkg-cmake.mk include package/pkg-cmake.mk
include package/pkg-python.mk

37
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
Loading…
Cancel
Save