diff options
| author | Jeffery To <jeffery.to@gmail.com> | 2023-06-29 16:13:52 +0800 |
|---|---|---|
| committer | Jeffery To <jeffery.to@gmail.com> | 2023-08-25 01:47:43 +0800 |
| commit | b595362b8567521b9bdf003dcc88f9b962c22b10 (patch) | |
| tree | e31b2d3daeb0e4ad40557408a838d8769d4de4ca /lang/python/python3 | |
| parent | 2ffb87726b93ffd73a5291d6db1bc3d13fbcde17 (diff) | |
python3: Centralize config file adjustments in Build/Install
Signed-off-by: Jeffery To <jeffery.to@gmail.com>
Diffstat (limited to 'lang/python/python3')
| -rw-r--r-- | lang/python/python3/Makefile | 14 | ||||
| -rw-r--r-- | lang/python/python3/files/python3-package-dev.mk | 3 |
2 files changed, 9 insertions, 8 deletions
diff --git a/lang/python/python3/Makefile b/lang/python/python3/Makefile index 304e24304..6e364e45e 100644 --- a/lang/python/python3/Makefile +++ b/lang/python/python3/Makefile @@ -31,7 +31,6 @@ PYTHON3_PKG_BUILD:=0 include ../python3-package.mk PKG_FIXUP:=autoreconf -PKG_INSTALL:=1 PKG_BUILD_PARALLEL:=1 HOST_BUILD_PARALLEL:=1 # LTO is handled here individually, see --with-lto below @@ -149,7 +148,7 @@ installation. endef # Set READELF here so that the exact same readelf program name can be -# replaced in _sysconfigdata.py (in Py3Package/python3-base/install) +# replaced in _sysconfigdata.py (in Build/Install) TARGET_CONFIGURE_OPTS+= \ READELF="$(TARGET_CROSS)readelf" @@ -197,6 +196,14 @@ CONFIGURE_ARGS += \ $(if $(CONFIG_IPV6),--enable-ipv6) \ $(if $(findstring mips,$(CONFIG_ARCH)),,--with-lto) +define Build/Install + $(call Build/Install/Default,) + + $(SED) 's|$(TARGET_AR)|ar|g;s|$(TARGET_CROSS)readelf|readelf|g;s|$(TARGET_CC)|gcc|g;s|$(TARGET_CXX)|g++|g' \ + $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON3_VERSION)/_sysconfigdata.py \ + $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON3_VERSION)/config-$(PYTHON3_VERSION)/Makefile +endef + define Build/InstallDev $(INSTALL_DIR) $(1)/usr/include $(1)/usr/lib $(1)/usr/lib/pkgconfig $(INSTALL_DIR) $(2)/bin @@ -270,9 +277,6 @@ define Py3Package/python3-base/install $(INSTALL_DIR) $(1)/usr/bin $(LN) python$(PYTHON3_VERSION) $(1)/usr/bin/python3 $(LN) python$(PYTHON3_VERSION) $(1)/usr/bin/python - # This depends on being called before filespec is processed - $(SED) 's|$(TARGET_AR)|ar|g;s|$(TARGET_CROSS)readelf|readelf|g;s|$(TARGET_CC)|gcc|g;s|$(TARGET_CXX)|g++|g' \ - $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON3_VERSION)/_sysconfigdata.py endef Py3Package/python3-light/install:=: diff --git a/lang/python/python3/files/python3-package-dev.mk b/lang/python/python3/files/python3-package-dev.mk index d9b7e7284..3eca521ff 100644 --- a/lang/python/python3/files/python3-package-dev.mk +++ b/lang/python/python3/files/python3-package-dev.mk @@ -24,9 +24,6 @@ define Py3Package/python3-dev/install $(LN) python$(PYTHON3_VERSION)-config $(1)/usr/bin/python3-config $(LN) python$(PYTHON3_VERSION)-config $(1)/usr/bin/python-config $(LN) python$(PYTHON3_VERSION)/config-$(PYTHON3_VERSION)/libpython$(PYTHON3_VERSION).a $(1)/usr/lib/ - # This depends on being called before filespec is processed - $(SED) 's|$(TARGET_AR)|ar|g;s|$(TARGET_CROSS)readelf|readelf|g;s|$(TARGET_CC)|gcc|g;s|$(TARGET_CXX)|g++|g' \ - $(PKG_INSTALL_DIR)/usr/lib/python$(PYTHON3_VERSION)/config-$(PYTHON3_VERSION)/Makefile endef $(eval $(call Py3BasePackage,python3-dev, \ |
