Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Handle meson based python-wheel #6454

Open
wants to merge 40 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
f4493bd
meson: Preliminary changes for meson cross vs native toolchain files
th0ma7 Feb 16, 2025
8c4c651
python-wheel-meson.mk: Preliminary work towards python-meson
th0ma7 Feb 16, 2025
1f99639
meson: setup native binaries
th0ma7 Feb 16, 2025
fe6b051
meson.mk: Have all C|CPP|CXX|LDFLAGS part of per depends cross-file
th0ma7 Feb 18, 2025
3267e9b
meson-python.mk: Now working proof of concept
th0ma7 Feb 19, 2025
a7c82a2
numpy: Cross-compilation fix for aarch64
th0ma7 Feb 19, 2025
c328ddc
numpy: Remove unecessary vi swap file
th0ma7 Feb 19, 2025
1fa562a
meson-env.mk: IEEE_DOUBLE definition works on x64 and aarch64
th0ma7 Feb 19, 2025
6e0c308
python-wheel-meson.mk: Functional except for aarch64
th0ma7 Feb 25, 2025
19b335b
numpy: Keeping track of currents range of testing
th0ma7 Feb 25, 2025
44a983e
python-wheel-meson.mk: Now functional for aarch64 but ugly
th0ma7 Feb 25, 2025
9a39379
numpy: Update numpy v2 and include numbpy v1
th0ma7 Feb 26, 2025
6567f3f
cross-meson-env.mk: Adjust big|little use-cases
th0ma7 Feb 26, 2025
a971a9c
python: Manage python/* subdirectory
th0ma7 Feb 26, 2025
bf0992f
python312|313-wheels: Update to make use of new python/numpy*
th0ma7 Feb 26, 2025
2e165d9
spk.mk: wheelclean manage python-wheel-meson.mk
th0ma7 Feb 26, 2025
0f0ba6a
python/numpy: Fix typo in makefile
th0ma7 Feb 26, 2025
59924e0
python-wheel-meson: Add redirection to use wheel log files
th0ma7 Feb 26, 2025
0d24802
tc.mk: Add fortran support to TCVERSION >= 7.0
th0ma7 Mar 1, 2025
d45aa69
crossenv.mk: Allow installing wheels from wheelhouse in crossenv
th0ma7 Mar 1, 2025
e6108fc
python-wheel-meson.mk: Better manage VENDOR_MESON
th0ma7 Mar 1, 2025
587e38a
numpy: Enable openblas and use workaround patch for aarch64
th0ma7 Mar 1, 2025
2516dd8
tc.mk: Use sheel type comparison to keep gcc_version value
th0ma7 Mar 1, 2025
13bc152
openblas: Update makefile to properly define archs
th0ma7 Mar 2, 2025
f2d3066
openblas: Misc fixes
th0ma7 Mar 2, 2025
72f344b
patch.mk: Allow patches in new python subdirectory tree
th0ma7 Mar 2, 2025
3816145
python-wheel-meson.mk: Fix PATH for configure vs build
th0ma7 Mar 2, 2025
b62bf33
numpy: Multiple fixes to use normal pip wheel call
th0ma7 Mar 6, 2025
8d45eaf
python-wheel-meson.mk: Remove override and use default pip wheel
th0ma7 Mar 6, 2025
3615df0
cross-meson-env.mk: Add multiple definitions for wheel use-cases
th0ma7 Mar 6, 2025
c4fdd99
tc.mk: Better handle version comparison using sort -V
th0ma7 Mar 6, 2025
9eb465e
numpy_1.26: Re-sync with numpy v2
th0ma7 Mar 6, 2025
26fc3ba
adjust build of cross/openblas
hgy59 Mar 7, 2025
adf9cdf
fix meson parameter for python-wheels
hgy59 Mar 7, 2025
e580975
add python/numpy_ha
hgy59 Mar 7, 2025
b310c8b
scipy: Add version 1.15.2 of scipy wheel
th0ma7 Mar 9, 2025
fed7423
python312-wheels: Add scipy build for DSM-7.1 supported archs
th0ma7 Mar 9, 2025
848e8ec
scipy: Misc clean-ups
th0ma7 Mar 10, 2025
6493679
crossenv/*: Move build wheel to cross section of the crossenv
th0ma7 Mar 10, 2025
f554291
python-wheel-meson.mk: Migrate from using pip to build
th0ma7 Mar 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ cross/*/work*
cross/*/build*
cross/*/status*
kernel/*/work*
python/*/work*
python/*/build*
python/*/status*
spk/*/work*
spk/*/build*
spk/*/crossenv*
Expand Down
67 changes: 67 additions & 0 deletions cross/openblas/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
PKG_NAME = OpenBLAS
PKG_VERS = 0.3.29
PKG_EXT = tar.gz
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://github.com/OpenMathLib/OpenBLAS/releases/download/v$(PKG_VERS)
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)

DEPENDS =

HOMEPAGE = http://www.openblas.net/
COMMENT = OpenBLAS is an optimized BLAS (Basic Linear Algebra Subprograms) library based on GotoBLAS2 1.13 BSD version.
LICENSE = 3-Clause BSD

UNSUPPORTED_ARCHS = $(PPC_ARCHS)

CMAKE_ARGS = -DBUILD_SHARED_LIBS=ON
# numpy uses very slow internal functions when BLAS and LAPACK are not available.
CMAKE_ARGS += -DBUILD_WITHOUT_LAPACK=OFF
CMAKE_ARGS += -DBUILD_TESTING=OFF

ADDITIONAL_CFLAGS = -Wno-unused-variable
ADDITIONAL_CFLAGS += -Wno-unused-function
ADDITIONAL_CFLAGS += -Wno-maybe-uninitialized
ADDITIONAL_CFLAGS += -Wno-parentheses

include ../../mk/spksrc.common.mk

ifeq ($(findstring $(ARCH),$(ARMv7_ARCHS)),$(ARCH))
# From Debian rule file:
# We cannot use the ARMv7 profile on armhf, because it requires a 32-register FP unit.
# See kernel/arm/KERNEL.ARMv7: it loads some *_vfpv3.S files, which use 32 registers.
# Also, it FTBFS if GCC flag -mvfpv3 is removed (see arm-gcc-flags.patch), because GCC
# refuses asm files with 32 FP registers in that case.
# Issue discussed in https://github.com/OpenMathLib/OpenBLAS/issues/388
# See also debian/patches/arm-gcc-flags.patch which is related.
ifeq ($(call version_ge, $(TC_GCC), 4.9),1)
CMAKE_ARGS += -DTARGET=ARMV6
else
# completly disable use of vpf
CMAKE_ARGS += -DTARGET=ARMV5
endif
endif

ifeq ($(findstring $(ARCH),$(ARMv7L_ARCHS) $(ARMv5_ARCHS)),$(ARCH))
CMAKE_ARGS += -DTARGET=ARMV5
endif

ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH))
CMAKE_ARGS += -DTARGET=ARMV8
endif

ifeq ($(findstring $(ARCH),$(x64_ARCHS)),$(ARCH))
# Options are: HASWELL (recent), SANDYBRIDGE (older), NEHALEM (most compatible)
CMAKE_ARGS += -DTARGET=SANDYBRIDGE
endif

ifeq ($(findstring $(ARCH),$(i686_ARCHS)),$(ARCH))
CMAKE_ARGS += -DTARGET=ATOM
endif

ifeq ($(findstring $(ARCH),$(64bit_ARCHS)),$(ARCH))
CMAKE_ARGS += -DBINARY=64
else
CMAKE_ARGS += -DBINARY=32
endif

include ../../mk/spksrc.cross-cmake.mk
3 changes: 3 additions & 0 deletions cross/openblas/PLIST
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
lnk:lib/libopenblas.so
lnk:lib/libopenblas.so.0
lib:lib/libopenblas.so.0.3
3 changes: 3 additions & 0 deletions cross/openblas/digests
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
OpenBLAS-0.3.29.tar.gz SHA1 575c33d545ad37ef1bfde677b02730591b1e7df4
OpenBLAS-0.3.29.tar.gz SHA256 38240eee1b29e2bde47ebb5d61160207dc68668a54cac62c076bb5032013b1eb
OpenBLAS-0.3.29.tar.gz MD5 853a0c5c0747c5943e7ef4bbb793162d
9 changes: 6 additions & 3 deletions mk/spksrc.cross-env.mk
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ endif
ifneq ($(strip $(TC)),)
TC_VARS_MK = $(WORK_DIR)/tc_vars.mk
TC_VARS_CMAKE = $(WORK_DIR)/tc_vars.cmake
TC_VARS_MESON = $(WORK_DIR)/tc_vars.meson
TC_VARS_MESON_CROSS = $(WORK_DIR)/tc_vars.meson-cross
TC_VARS_MESON_NATIVE = $(WORK_DIR)/tc_vars.meson-native

# Mandatory to build the CFLAGS and LDFLAGS env variables
export INSTALL_DIR
Expand All @@ -62,7 +63,8 @@ ifeq ($(strip $(MAKECMDGOALS)),download)
then \
env $(MAKE) WORK_DIR=$(TC_WORK_DIR) --no-print-directory -C ../../toolchain/$(TC) tc_vars > $(TC_VARS_MK) ; \
env $(MAKE) WORK_DIR=$(TC_WORK_DIR) --no-print-directory -C ../../toolchain/$(TC) cmake_vars > $(TC_VARS_CMAKE) ; \
env $(MAKE) WORK_DIR=$(TC_WORK_DIR) --no-print-directory -C ../../toolchain/$(TC) meson_vars > $(TC_VARS_MESON) ; \
env $(MAKE) WORK_DIR=$(TC_WORK_DIR) --no-print-directory -C ../../toolchain/$(TC) meson_cross_vars > $(TC_VARS_MESON_CROSS) ; \
env $(MAKE) WORK_DIR=$(TC_WORK_DIR) --no-print-directory -C ../../toolchain/$(TC) meson_native_vars > $(TC_VARS_MESON_NATIVE) ; \
else \
echo "$$""(error An error occured while downloading the toolchain, please check the messages above)" > $@; \
fi
Expand All @@ -72,7 +74,8 @@ else
then \
env $(MAKE) WORK_DIR=$(TC_WORK_DIR) --no-print-directory -C ../../toolchain/$(TC) tc_vars > $(TC_VARS_MK) ; \
env $(MAKE) WORK_DIR=$(TC_WORK_DIR) --no-print-directory -C ../../toolchain/$(TC) cmake_vars > $(TC_VARS_CMAKE) ; \
env $(MAKE) WORK_DIR=$(TC_WORK_DIR) --no-print-directory -C ../../toolchain/$(TC) meson_vars > $(TC_VARS_MESON) ; \
env $(MAKE) WORK_DIR=$(TC_WORK_DIR) --no-print-directory -C ../../toolchain/$(TC) meson_cross_vars > $(TC_VARS_MESON_CROSS) ; \
env $(MAKE) WORK_DIR=$(TC_WORK_DIR) --no-print-directory -C ../../toolchain/$(TC) meson_native_vars > $(TC_VARS_MESON_NATIVE) ; \
else \
echo "$$""(error An error occured while setting up the toolchain, please check the messages above)" > $@; \
fi
Expand Down
85 changes: 83 additions & 2 deletions mk/spksrc.cross-meson-env.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,12 @@ CONFIGURE_ARGS += -Dbuildtype=$(MESON_BUILD_TYPE)
endif

# Configuration for meson build
MESON_TOOLCHAIN_WRK = $(WORK_DIR)/tc_vars.meson
CONFIGURE_ARGS += --cross-file $(MESON_TOOLCHAIN_WRK)
MESON_TOOLCHAIN_NAME = $(ARCH)-toolchain.meson
MESON_CROSS_TOOLCHAIN_WRK = $(WORK_DIR)/tc_vars.meson-cross
MESON_CROSS_TOOLCHAIN_PKG = $(WORK_DIR)/$(PKG_DIR)/$(MESON_TOOLCHAIN_NAME)
MESON_NATIVE_TOOLCHAIN_WRK = $(WORK_DIR)/tc_vars.meson-native
CONFIGURE_ARGS += --cross-file=$(MESON_CROSS_TOOLCHAIN_PKG)
#CONFIGURE_ARGS += --native-file=$(MESON_NATIVE_TOOLCHAIN_WRK)

ifeq ($(findstring $(ARCH),$(ARMv5_ARCHS)),$(ARCH))
MESON_HOST_CPU_FAMILY = arm
Expand All @@ -30,18 +34,21 @@ ifeq ($(findstring $(ARCH),$(ARMv5_ARCHS)),$(ARCH))
endif
ifeq ($(findstring $(ARCH),$(ARMv7_ARCHS)),$(ARCH))
MESON_BUILTIN_CPP_ARGS = -fPIC
MESON_BUILTIN_FC_ARGS = -fPIC
MESON_HOST_CPU_FAMILY = arm
MESON_HOST_CPU = armv7
MESON_HOST_ENDIAN = little
endif
ifeq ($(findstring $(ARCH),$(ARMv7L_ARCHS)),$(ARCH))
MESON_BUILTIN_CPP_ARGS = -fPIC
MESON_BUILTIN_FC_ARGS = -fPIC
MESON_HOST_CPU_FAMILY = arm
MESON_HOST_CPU = armv7l
MESON_HOST_ENDIAN = little
endif
ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH))
MESON_BUILTIN_CPP_ARGS = -fPIC
MESON_BUILTIN_FC_ARGS = -fPIC
MESON_HOST_CPU_FAMILY = aarch64
MESON_HOST_CPU = aarch64
MESON_HOST_ENDIAN = little
Expand All @@ -56,6 +63,8 @@ ifeq ($(findstring $(ARCH),$(i686_ARCHS)),$(ARCH))
MESON_BUILTIN_C_LINK_ARGS = -m32
MESON_BUILTIN_CPP_ARGS = -m32
MESON_BUILTIN_CPP_LINK_ARGS = -m32
MESON_BUILTIN_FC_ARGS = -m32
MESON_BUILTIN_FC_LINK_ARGS = -m32
MESON_HOST_CPU_FAMILY = x86
MESON_HOST_CPU = i686
MESON_HOST_ENDIAN = little
Expand All @@ -65,3 +74,75 @@ ifeq ($(findstring $(ARCH),$(x64_ARCHS)),$(ARCH))
MESON_HOST_CPU = x86_64
MESON_HOST_ENDIAN = little
endif

.PHONY: $(MESON_CROSS_TOOLCHAIN_PKG)
$(MESON_CROSS_TOOLCHAIN_PKG):
@$(MSG) Generating $(MESON_TOOLCHAIN_PKG)
env $(MAKE) --no-print-directory meson_pkg_toolchain > $(MESON_CROSS_TOOLCHAIN_PKG) 2>/dev/null;

.PHONY: meson_pkg_toolchain
meson_pkg_toolchain: SHELL:=/bin/bash
meson_pkg_toolchain:
@cat $(MESON_CROSS_TOOLCHAIN_WRK)
ifeq ($(strip $(MESON_PYTHON)),1)
$(foreach e,$(shell cat $(CROSSENV_WHEEL_PATH)/build/python-cc.mk),$(eval $(e)))
@. $(CROSSENV) ; \
export PATH=$(call dedup,$(CROSSENV_PATH)/cross/bin:$(CROSSENV_PATH)/build/bin:$(CROSSENV_PATH)/bin:$${PATH}, :) ; \
echo "cython = '$$(which cython)'" ; \
echo "meson = '$$(which meson)'" ; \
echo "pkg-config = '$$(which pkg-config)'" ; \
echo "python = '$$(which cross-python)'"
endif
@echo
@echo "[built-in options]" ; \
echo "prefix = '$(STAGING_INSTALL_PREFIX)'"
@echo
@echo "[properties]" ; \
echo "pkg_config_path = '$(abspath $(PKG_CONFIG_LIBDIR))'"
@echo
@echo "[built-in]" ; \
echo "c_args = ["
ifneq ($(strip $(MESON_BUILTIN_C_ARGS)),)
@echo -ne "\t'$(MESON_BUILTIN_C_ARGS)',\n"
endif
@echo $(CFLAGS) | tr ' ' '\n' | sed -e "s/^/\t'/" -e "s/$$/',/" ; \
echo -ne "\t]\n"
@echo
@echo "c_link_args = ["
ifneq ($(strip $(MESON_BUILTIN_C_LINK_ARGS)),)
@echo -ne "\t'$(MESON_BUILTIN_C_LINK_ARGS)',\n"
endif
@echo $(LDFLAGS) | tr ' ' '\n' | sed -e "s/^/\t'/" -e "s/$$/',/" ; \
echo -ne "\t]\n"
@echo
@echo "cpp_args = ["
ifneq ($(strip $(MESON_BUILTIN_CPP_ARGS)),)
@echo -ne "\t'$(MESON_BUILTIN_CPP_ARGS)',\n"
endif
@echo $(CPPFLAGS) | tr ' ' '\n' | sed -e "s/^/\t'/" -e "s/$$/',/" ; \
echo -ne "\t]\n"
@echo
@echo "cpp_link_args = ["
ifneq ($(strip $(MESON_BUILTIN_CPP_LINK_ARGS)),)
@echo -ne "\t'$(MESON_BUILTIN_CPP_LINK_ARGS)',\n"
endif
@echo $(LDFLAGS) | tr ' ' '\n' | sed -e "s/^/\t'/" -e "s/$$/',/" ; \
echo -ne "\t]\n"
@echo
@echo "cxx_args = ["
@echo $(CXXFLAGS) | tr ' ' '\n' | sed -e "s/^/\t'/" -e "s/$$/',/" ; \
echo -ne "\t]\n"
@echo
@echo "fc_args = ["
ifneq ($(strip $(MESON_BUILTIN_FC_ARGS)),)
@echo -ne "\t'$(MESON_BUILTIN_FC_ARGS)',\n"
endif
@echo $(FFLAGS) | tr ' ' '\n' | sed -e "s/^/\t'/" -e "s/$$/',/" ; \
echo -ne "\t]\n"
@echo
@echo "fc_link_args = ["
ifneq ($(strip $(MESON_BUILTIN_FC_LINK_ARGS)),)
@echo -ne "\t'$(MESON_BUILTIN_FC_LINK_ARGS)',\n"
endif
@echo $(LDFLAGS) | tr ' ' '\n' | sed -e "s/^/\t'/" -e "s/$$/',/" ; \
echo -ne "\t]\n"
2 changes: 1 addition & 1 deletion mk/spksrc.cross-meson.mk
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ include ../../mk/spksrc.cross-ninja.mk
.PHONY: meson_configure_target

# default meson configure:
meson_configure_target:
meson_configure_target: $(MESON_CROSS_TOOLCHAIN_PKG)
@$(MSG) - Meson configure
@$(MSG) - Dependencies = $(DEPENDS)
@$(MSG) - Build path = $(MESON_BUILD_DIR)
Expand Down
41 changes: 38 additions & 3 deletions mk/spksrc.cross-ninja.mk
Original file line number Diff line number Diff line change
Expand Up @@ -58,18 +58,53 @@ POST_INSTALL_TARGET = ninja_post_install_target
endif
endif

###
#
# python wheel using meson use-case
ifeq ($(strip $(MESON_PYTHON)),1)

# Define where is located the crossenv
CROSSENV_WHEEL_PATH = $(firstword $(wildcard $(WORK_DIR)/crossenv-$(PKG_NAME)-$(PKG_VERS) $(WORK_DIR)/crossenv-$(PKG_NAME) $(WORK_DIR)/crossenv-default))

# If using spksrc.python.mk with PYTHON_STAGING_PREFIX defined
# then redirect STAGING_INSTALL_PREFIX so rust
# wheels can find openssl and other libraries
ifneq ($(wildcard $(PYTHON_STAGING_PREFIX)),)
STAGING_INSTALL_PREFIX := $(PYTHON_STAGING_PREFIX)
endif
endif

###

.PHONY: ninja_compile_target

# default ninja compile:
ninja_compile_target: SHELL:=/bin/bash
ninja_compile_target:
@$(MSG) - Ninja compile
@$(MSG) - Ninja build path = $(WORK_DIR)/$(PKG_DIR)/$(NINJA_BUILD_DIR)
@$(MSG) Ninja compile
@$(MSG) "- Ninja build path: [$(WORK_DIR)/$(PKG_DIR)/$(NINJA_BUILD_DIR)]"
ifeq ($(strip $(CMAKE_USE_NINJA)),1)
@$(MSG) - Use NASM = $(CMAKE_USE_NASM)
@$(MSG) "- Use NASM: [$(CMAKE_USE_NASM)]"
endif
ifeq ($(strip $(MESON_PYTHON)),1)
$(foreach e,$(shell cat $(CROSSENV_WHEEL_PATH)/build/python-cc.mk),$(eval $(e)))
@set -o pipefail; { \
$(MSG) "- meson-python" ; \
$(MSG) "- crossenv: [$(CROSSENV)]" ; \
. $(CROSSENV) ; \
if [ -e "$(CROSSENV)" ] ; then \
export PATH=$${PATH}:$(CROSSENV_PATH)/build/bin ; \
$(MSG) "crossenv: [$(CROSSENV)]" ; \
$(MSG) "cython: [$$(which cython)]" ; \
else \
echo "ERROR: crossenv not found!" ; \
exit 2 ; \
fi ; \
$(RUN) PATH=$${PATH} ninja -C $(NINJA_BUILD_DIR) ; \
} > >(tee --append $(WHEEL_LOG)) 2>&1 ; [ $${PIPESTATUS[0]} -eq 0 ] || false
else
$(RUN) ninja -C $(NINJA_BUILD_DIR)
endif

.PHONY: ninja_install_target

Expand Down
40 changes: 34 additions & 6 deletions mk/spksrc.crossenv.mk
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
include ../../mk/spksrc.cross-cmake-env.mk

# include meson definitions
include ../../mk/spksrc.cross-meson-env.mk
#include ../../mk/spksrc.cross-meson-env.mk

# Defined using PYTHON_PACKAGE_WORK_DIR from spksrc.python.mk or use local work directory
PYTHON_WORK_DIR = $(or $(wildcard $(PYTHON_PACKAGE_WORK_DIR)),$(wildcard $(WORK_DIR)))
Expand Down Expand Up @@ -215,6 +215,30 @@ endif
### <crossenv> = $(lastword $(subst -, ,$*)) being <wheel>-<version>, <wheel> or default
###
crossenv-install-%:
ifeq ($(WHEEL_TYPE),wheelhouse)
@. $(abspath $(WORK_DIR)/crossenv-$(lastword $(subst -, ,$*)))/bin/activate ; \
if [ -e "$(abspath $(WORK_DIR)/crossenv-$(lastword $(subst -, ,$*)))/bin/activate" ] ; then \
export PATH=$${PATH}:$(abspath $(WORK_DIR)/crossenv-$(lastword $(subst -, ,$*)))/build/bin ; \
$(MSG) "crossenv: [$(abspath $(WORK_DIR)/crossenv-$(lastword $(subst -, ,$*)))/bin/activate]" ; \
$(MSG) "python: [$$(which cross-python)]" ; \
else \
echo "ERROR: crossenv not found!" ; \
exit 2 ; \
fi ; \
$(MSG) \
$$(which cross-python) -m pip install \
--cache-dir $(PIP_CACHE_DIR) \
--find-links file://$(WHEELHOUSE) \
--disable-pip-version-check \
$(WHEEL_NAME)==$(WHEEL_VERSION) ; \
$(RUN) \
PATH=$${PATH} \
$$(which cross-python) -m pip install \
--cache-dir $(PIP_CACHE_DIR) \
--find-links file://$(WHEELHOUSE) \
--disable-pip-version-check \
$(WHEEL_NAME)==$(WHEEL_VERSION)
else
@. $(abspath $(WORK_DIR)/crossenv-$(lastword $(subst -, ,$*)))/bin/activate ; \
if [ -e "$(abspath $(WORK_DIR)/crossenv-$(lastword $(subst -, ,$*)))/bin/activate" ] ; then \
export PATH=$${PATH}:$(abspath $(WORK_DIR)/crossenv-$(lastword $(subst -, ,$*)))/build/bin ; \
Expand All @@ -225,14 +249,17 @@ crossenv-install-%:
exit 2 ; \
fi ; \
$(MSG) \
$$(which $(WHEEL_TYPE)-python) -m pip \
install $(WHEEL_NAME)==$(WHEEL_VERSION) ; \
$$(which $(WHEEL_TYPE)-python) -m pip install \
--cache-dir $(PIP_CACHE_DIR) \
--disable-pip-version-check \
$(WHEEL_NAME)==$(WHEEL_VERSION) ; \
$(RUN) \
PATH=$${PATH} \
$$(which $(WHEEL_TYPE)-python) -m pip \
$$(which $(WHEEL_TYPE)-python) -m pip install \
--cache-dir $(PIP_CACHE_DIR) \
--disable-pip-version-check \
install $(WHEEL_NAME)==$(WHEEL_VERSION)
$(WHEEL_NAME)==$(WHEEL_VERSION)
endif


##
Expand All @@ -259,7 +286,8 @@ $(CROSSENV_PATH)/build/python-cc.mk:
@echo PYO3_CROSS_LIB_DIR=$(abspath $(PYTHON_STAGING_INSTALL_PREFIX)/lib) >> $@
@echo PYO3_CROSS_INCLUDE_DIR=$(abspath $(PYTHON_STAGING_INSTALL_PREFIX)/include) >> $@
@echo CMAKE_TOOLCHAIN_FILE=$(abspath $(CMAKE_TOOLCHAIN_WRK)) >> $@
@echo MESON_CROSS_FILE=$(abspath $(MESON_TOOLCHAIN_WRK)) >> $@
@echo MESON_CROSS_FILE=$(abspath $(MESON_CROSS_TOOLCHAIN_WRK)) >> $@
@echo MESON_NATIVE_FILE=$(abspath $(MESON_NATIVE_TOOLCHAIN_WRK)) >> $@
@echo OPENSSL_LIB_DIR=$(abspath $(PYTHON_STAGING_INSTALL_PREFIX)/lib) >> $@
@echo OPENSSL_INCLUDE_DIR=$(abspath $(PYTHON_STAGING_INSTALL_PREFIX)/include) >> $@
@echo PIP=$(abspath $(WORK_DIR)/../../../native/$(PYTHON_PKG_NAME)/work-native/install/usr/local/bin/pip) >> $@
Expand Down
4 changes: 2 additions & 2 deletions mk/spksrc.dependency-tree.mk
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,13 @@ dependency-tree:
.PHONY: dependency-list
dependency-list:
@echo -n "$(NAME): "
@$(MAKE) -s dependency-flat | grep -P "^(cross|native)" | sort -u | tr '\n' ' \0'
@$(MAKE) -s dependency-flat | grep -P "^(cross|python|native)" | sort -u | tr '\n' ' \0'
@echo ""


.PHONY: dependency-flat
dependency-flat:
@echo "$(CURDIR)" | grep -Po "/\K(spk|cross|native|diyspk|toolchain)/.*"
@echo "$(CURDIR)" | grep -Po "/\K(spk|cross|python|native|diyspk|toolchain)/.*"
@for depend in $$(echo "$(BUILD_DEPENDS) $(DEPENDS) $(OPTIONAL_DEPENDS)" | tr ' ' '\n' | sort -u | tr '\n' ' ') ; \
do \
DEPENDENCY_WALK=1 $(MAKE) -s -C ../../$$depend dependency-flat | sort -u ; \
Expand Down
Loading