Skip to content

Commit 5b75b46

Browse files
th0ma7hgy59
andauthored
py311-310: Update to latest version (#5866)
* py311-310: Update to latest version * spk.mk: Add a make pythonclean option to facilitate rebuilds * py311-310: Test building all wheels * py311-310: Disable building all wheels as successful * python.mk: Ensure cross/* wheels are being re-processed * homeassistant: Mark as broken until @hgy59 complete PR #5857 * python38: Remove as deprecated in favor of python 3.10-3.11 * cryptography: Mark armv5 as unsupported due to lack of libatomic * bazarr: Mark ARMv7L as now unsupported with py311 due to numpy * sabnzbd: Bump package to enforce using newer python * sickchill: Bump package to enforce using newer python * deluge: Bump package to enforce using newer python * python311: Mark ARMv5 as unsupported directly within cross * python311: Revert setuptools ver for numpy 1.23 in homeassistant * spk.mk: Differenciate pythonclean vs pythoncleanall pythonclean: will cleanup the crossenv directory pythoncleanall: will cleanup all python build files * beets, borgbackup, mercurial, octoprint, rdiff-backup: ARMv5 removed * python.mk: Fix issue with znc * python.mk: Fine-tune include directories and remov bzip2 exception * python.mk: Additional fixes specific to ZNC * python.mk: Move exceptions to ZNC package directly * vim: Migrate to spksrc.python.mk along with python 3.11 * znc: Refer to PYTHON_PACKAGE in BUILD_DEPENDS for cross * vim: Mark armv5 as unsupported * vim & python.mk: Proposal to allow creating a vim for all archs * vim: Apply @hgy59 proposal related to changelog * vim: Added missing include of spksrc.archs.mk for proper ifneq * Update spk/vim/Makefile Co-authored-by: hgy59 <hpgy59@gmail.com> --------- Co-authored-by: hgy59 <hpgy59@gmail.com>
1 parent 7f9dc1b commit 5b75b46

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+239
-273
lines changed

cross/cryptography/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ HOMEPAGE = https://github.com/pyca/cryptography
1111
COMMENT = Provide cryptographic recipes and primitives to Python developers
1212
LICENSE = BSD/ASL2
1313

14+
# Unsupported due to lack of libatomic
15+
# being mandatory with OpenSSL >= 3.x
16+
UNSUPPORTED_ARCHS = $(ARMv5_ARCHS)
17+
1418
###
1519
### This cross/cryptography is needed to generate python-limited abi3 wheels
1620
### Ref: https://github.com/pyca/cryptography/issues/7671

cross/pip/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PKG_NAME = pip
22
# use the same version in native/python310|311/Makefile (python310|311_native_post_install)
3-
PKG_VERS = 23.1.2
3+
PKG_VERS = 23.2.1
44
PKG_EXT = tar.gz
55
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
66
PKG_DIST_SITE = https://files.pythonhosted.org/packages/source/p/$(PKG_NAME)

cross/pip/digests

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
pip-23.1.2.tar.gz SHA1 ac4e7527d0d9093cadc46e6d2008f202cbef04e2
2-
pip-23.1.2.tar.gz SHA256 0e7c86f486935893c708287b30bd050a36ac827ec7fe5e43fe7cb198dd835fba
3-
pip-23.1.2.tar.gz MD5 dd899cacab913941c48f728ef596dafe
1+
pip-23.2.1.tar.gz SHA1 4bdfd8e976b5122cf55f4f4740f7305f1ffa4310
2+
pip-23.2.1.tar.gz SHA256 fb0bd5435b3200c602b5bf61d2d43c2f13c02e29c1707567ae7fbc514eb9faf2
3+
pip-23.2.1.tar.gz MD5 e9b1226701a56ee3fcc81aba60d25d75

cross/python310/Makefile

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PKG_NAME = python310
2-
PKG_VERS = 3.10.12
2+
PKG_VERS = 3.10.13
33
PKG_VERS_MAJOR_MINOR = $(word 1,$(subst ., ,$(PKG_VERS))).$(word 2,$(subst ., ,$(PKG_VERS)))
44
PKG_EXT = tar.xz
55
PKG_DIST_NAME = Python-$(PKG_VERS).$(PKG_EXT)
@@ -133,17 +133,25 @@ python310_install:
133133

134134

135135
# wheels to install in crossenv
136-
CROSSENV_WHEELS = setuptools-rust==1.6.0
136+
CROSSENV_WHEELS = setuptools-rust==1.7.0
137137
CROSSENV_WHEELS += setuptools-scm==7.1.0
138138
CROSSENV_WHEELS += cffi==1.15.1
139-
CROSSENV_WHEELS += Cython==0.29.35
139+
#
140+
# Cython version >= 3.x breaks PyYAML wheel
141+
# https://github.com/yaml/pyyaml/issues/601
142+
#
143+
# It also breaks numpy at crossenv creation time using github-action
144+
# https://numpy.org/devdocs/reference/distutils_status_migration.html
145+
# Python 3.12 considerations: scikit-build-core, meson-python
146+
#CROSSENV_WHEELS += Cython==3.0.2
147+
CROSSENV_WHEELS += Cython==0.29.36
140148
CROSSENV_WHEELS += flit==3.9.0
141149
ifneq ($(findstring $(ARCH),$(OLD_PPC_ARCHS)),$(ARCH))
142150
CROSSENV_WHEELS += cryptography==41.0.3
143-
CROSSENV_WHEELS += poetry==1.5.1
151+
CROSSENV_WHEELS += poetry==1.6.1
144152
endif
145153
ifneq ($(findstring $(ARCH),$(ARMv5_ARCHS) $(OLD_PPC_ARCHS)),$(ARCH))
146-
CROSSENV_WHEELS += maturin==1.1.0
154+
CROSSENV_WHEELS += maturin==1.2.3
147155
endif
148156

149157
# Create the crossenv in preparation for
@@ -154,10 +162,10 @@ python310_post_install: $(WORK_DIR)/python-cc.mk
154162
cp -R $(HOSTPYTHON_LIB_NATIVE) $(PYTHON_LIB_CROSS)/../
155163
@$(RUN) $(PYTHON_NATIVE) -m crossenv $(STAGING_INSTALL_PREFIX)/bin/python$(PKG_VERS_MAJOR_MINOR) --cc $(TC_PATH)$(TC_PREFIX)gcc --cxx $(TC_PATH)$(TC_PREFIX)c++ --ar $(TC_PATH)$(TC_PREFIX)ar --sysroot $(TC_SYSROOT) --env LIBRARY_PATH= --manylinux manylinux2014 $(WORK_DIR)/crossenv/
156164
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) wget https://bootstrap.pypa.io/get-pip.py
157-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-python get-pip.py "pip==23.1.2" --no-setuptools --no-wheel --disable-pip-version-check
158-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) python get-pip.py "pip==23.1.2" --no-setuptools --no-wheel --disable-pip-version-check
159-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-pip --disable-pip-version-check install "setuptools==63.4.3" "wheel==0.40.0"
160-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) pip --disable-pip-version-check install "setuptools==63.4.3" "wheel==0.40.0"
165+
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-python get-pip.py "pip==23.2.1" --no-setuptools --no-wheel --disable-pip-version-check
166+
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) python get-pip.py "pip==23.2.1" --no-setuptools --no-wheel --disable-pip-version-check
167+
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-pip --disable-pip-version-check install "setuptools==68.1.2" "wheel==0.41.2"
168+
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) pip --disable-pip-version-check install "setuptools==68.1.2" "wheel==0.41.2"
161169
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-pip --disable-pip-version-check install $(CROSSENV_WHEELS)
162170
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) pip --disable-pip-version-check install $(CROSSENV_WHEELS)
163171
ifneq ($(PYTHON_LIB_NATIVE),$(PYTHON_LIB_CROSS))

cross/python310/digests

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Python-3.10.12.tar.xz SHA1 85e043a6cd30835bdf95e3db2d1b4b15e142d067
2-
Python-3.10.12.tar.xz SHA256 afb74bf19130e7a47d10312c8f5e784f24e0527981eab68e20546cfb865830b8
3-
Python-3.10.12.tar.xz MD5 49b0342476b984e106d308c25d657f12
1+
Python-3.10.13.tar.xz SHA1 fa66c061cba1acee5e9fe69b7d22cca744a6ecda
2+
Python-3.10.13.tar.xz SHA256 5c88848668640d3e152b35b4536ef1c23b2ca4bd2c957ef1ecbb053f571dd3f6
3+
Python-3.10.13.tar.xz MD5 8847dc6458d1431d0ae0f55942deeb89

cross/python311/Makefile

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
PKG_NAME = python311
2-
PKG_VERS = 3.11.4
2+
PKG_VERS = 3.11.5
33
PKG_VERS_MAJOR_MINOR = $(word 1,$(subst ., ,$(PKG_VERS))).$(word 2,$(subst ., ,$(PKG_VERS)))
44
PKG_EXT = tar.xz
55
PKG_DIST_NAME = Python-$(PKG_VERS).$(PKG_EXT)
@@ -9,6 +9,10 @@ PKG_DIR = Python-$(PKG_VERS)
99
# Platform "powerpc-none-linux-gnuspe" with compiler "gcc" is not supported by the
1010
# CPython core team, see https://peps.python.org/pep-0011/ for more information.
1111
UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS)
12+
# Missing libatomic for proper openssl >= 3.x support
13+
# Ref: https://github.com/SynoCommunity/spksrc/issues/5841
14+
# https://github.com/SynoCommunity/spksrc/pull/5820#issuecomment-1678221438
15+
UNSUPPORTED_ARCHS += $(ARMv5_ARCHS)
1216

1317
BUILD_DEPENDS = native/$(PKG_NAME)
1418

@@ -131,12 +135,23 @@ python311_install:
131135
# default wheels to install in crossenv
132136
CROSSENV_WHEELS = cffi==1.15.1
133137
CROSSENV_WHEELS += cryptography==41.0.3
134-
CROSSENV_WHEELS += Cython==0.29.35
138+
#
139+
# Cython version >= 3.x breaks PyYAML wheel
140+
# https://github.com/yaml/pyyaml/issues/601
141+
#
142+
# It also breaks numpy at crossenv creation time using github-action
143+
# https://numpy.org/devdocs/reference/distutils_status_migration.html
144+
# Python 3.12 considerations: scikit-build-core, meson-python
145+
#CROSSENV_WHEELS += Cython==3.0.2
146+
CROSSENV_WHEELS += Cython==0.29.36
135147
CROSSENV_WHEELS += flit==3.9.0
136-
CROSSENV_WHEELS += poetry==1.5.1
148+
CROSSENV_WHEELS += poetry==1.6.1
137149
CROSSENV_WHEELS += scikit-build==0.17.6
138-
CROSSENV_WHEELS += setuptools-rust==1.6.0
150+
CROSSENV_WHEELS += setuptools-rust==1.7.0
139151
CROSSENV_WHEELS += setuptools-scm==7.1.0
152+
# For future usages when building numpy >= 1.26
153+
#CROSSENV_WHEELS += meson-python==0.13.2
154+
#CROSSENV_WHEELS += scikit-build-core==0.5.0
140155

141156
# [numpy] <= 1.21.6 (armv5) - gcc-4.6.4 - unsupported
142157
# [numpy] <= 1.22.4 (armv7l) - gcc-4.8.3 - unsupported
@@ -146,13 +161,13 @@ ifeq ($(call version_le, $(TC_GCC), 5.0),1)
146161
CROSSENV_WHEELS += numpy==1.24.4
147162
# [numpy] >= 1.25.0 requires c++17
148163
else ifeq ($(call version_gt, $(TC_GCC), 5.0),1)
149-
CROSSENV_WHEELS += numpy==1.25.1
164+
CROSSENV_WHEELS += numpy==1.25.2
150165
endif
151166
endif
152167

153168
# [maturin]
154169
ifneq ($(findstring $(ARCH),$(ARMv5_ARCHS)),$(ARCH))
155-
CROSSENV_WHEELS += maturin==1.1.0
170+
CROSSENV_WHEELS += maturin==1.2.3
156171
endif
157172

158173
# Create the crossenv in preparation for
@@ -163,10 +178,10 @@ python311_post_install: $(WORK_DIR)/python-cc.mk
163178
cp -R $(HOSTPYTHON_LIB_NATIVE) $(PYTHON_LIB_CROSS)/../
164179
@$(RUN) $(PYTHON_NATIVE) -m crossenv $(STAGING_INSTALL_PREFIX)/bin/python$(PKG_VERS_MAJOR_MINOR) --cc $(TC_PATH)$(TC_PREFIX)gcc --cxx $(TC_PATH)$(TC_PREFIX)c++ --ar $(TC_PATH)$(TC_PREFIX)ar --sysroot $(TC_SYSROOT) --env LIBRARY_PATH= --manylinux manylinux2014 $(WORK_DIR)/crossenv/
165180
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) wget https://bootstrap.pypa.io/get-pip.py
166-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-python get-pip.py "pip==23.1.2" --no-setuptools --no-wheel --disable-pip-version-check
167-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) python get-pip.py "pip==23.1.2" --no-setuptools --no-wheel --disable-pip-version-check
168-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-pip --disable-pip-version-check install "setuptools==63.4.3" "wheel==0.40.0"
169-
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) pip --disable-pip-version-check install "setuptools==63.4.3" "wheel==0.40.0"
181+
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-python get-pip.py "pip==23.2.1" --no-setuptools --no-wheel --disable-pip-version-check
182+
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) python get-pip.py "pip==23.2.1" --no-setuptools --no-wheel --disable-pip-version-check
183+
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-pip --disable-pip-version-check install "setuptools==63.4.3" "wheel==0.41.2"
184+
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) pip --disable-pip-version-check install "setuptools==63.4.3" "wheel==0.41.2"
170185
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) build-pip --disable-pip-version-check install $(CROSSENV_WHEELS)
171186
. $(WORK_DIR)/crossenv/bin/activate && $(RUN) pip --disable-pip-version-check install $(CROSSENV_WHEELS)
172187
ifneq ($(PYTHON_LIB_NATIVE),$(PYTHON_LIB_CROSS))

cross/python311/digests

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
Python-3.11.4.tar.xz SHA1 413b3715d919a7b473281529ab91eeea5c82e632
2-
Python-3.11.4.tar.xz SHA256 2f0e409df2ab57aa9fc4cbddfb976af44e4e55bf6f619eee6bc5c2297264a7f6
3-
Python-3.11.4.tar.xz MD5 fb7f7eae520285788449d569e45b6718
1+
Python-3.11.5.tar.xz SHA1 b13ec58fa6ebf5b0f7178555c5506e135cb7d785
2+
Python-3.11.5.tar.xz SHA256 85cd12e9cf1d6d5a45f17f7afe1cebe7ee628d3282281c492e86adf636defa3f
3+
Python-3.11.5.tar.xz MD5 393856f1b7713aa8bba4b642ab9985d3

cross/vim/Makefile

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,11 @@ PKG_DIST_SITE = https://ftp.nluug.nl/pub/vim/unix
66
SPECIFIC_VERSION=$(subst .,,$(PKG_VERS))
77
PKG_DIR = $(PKG_NAME)$(SPECIFIC_VERSION)
88

9-
PYTHON_PACKAGE = python310
9+
ifeq ($(strip $(PYTHON_PACKAGE)),)
10+
PYTHON_PACKAGE = python311
11+
endif
1012

11-
BUILD_DEPENDS = cross/$(PYTHON_PACKAGE)
13+
OPTIONAL_DEPENDS = cross/$(PYTHON_PACKAGE)
1214
DEPENDS = cross/ncursesw
1315

1416
HOMEPAGE = https://www.vim.org/
@@ -20,27 +22,28 @@ CONFIGURE_ARGS = --with-compiledby=SynoCommunity
2022
CONFIGURE_ARGS += --with-features=huge --with-tlib=ncursesw
2123
CONFIGURE_ARGS += vim_cv_toupper_broken=no vim_cv_terminfo=yes vim_cv_tgetent=zero vim_cv_tty_group=world
2224
CONFIGURE_ARGS += vim_cv_getcwd_broken=yes vim_cv_stat_ignores_slash=yes vim_cv_memmove_handles_overlap=yes
25+
26+
include ../../mk/spksrc.archs.mk
27+
28+
ifneq ($(findstring $(ARCH),$(ARMv5_ARCHS) $(OLD_PPC_ARCHS)),$(ARCH))
29+
BUILD_DEPENDS = cross/$(PYTHON_PACKAGE)
2330
CONFIGURE_ARGS += --enable-python3interp=dynamic --with-python3-command=$(HOSTPYTHON)
2431
CONFIGURE_ARGS += vi_cv_path_python3_conf=$(PYTHON_CFG_PATH)
2532
CONFIGURE_ARGS += vi_cv_path_python3_pfx=$(PYTHON_PREFIX)
2633
CONFIGURE_ARGS += vi_cv_path_python3_epfx=$(PYTHON_EXEC_PREFIX)
2734
CONFIGURE_ARGS += vi_cv_path_python3path=$(PYTHONPATH)
28-
29-
include ../../mk/spksrc.archs.mk
35+
endif
3036

3137
# Avoid warning that _FORTIFY_SOURCE requires compiling with optimization
3238
ifeq ($(findstring $(ARCH),$(OLD_PPC_ARCHS)),$(ARCH))
3339
# With -O2 optimization there is an ICE with older ppc cross compilers
3440
# usercmd.c:1535: internal compiler error: in set_uids_in_ptset, at tree-ssa-structalias.c:4775
3541
# bug of GCC 4.2/4.3 in tree-optimization
36-
ADDITIONAL_CFLAGS = -O
42+
ADDITIONAL_CFLAGS += -O
3743
else
38-
ADDITIONAL_CFLAGS = -O2
44+
ADDITIONAL_CFLAGS += -O2
3945
endif
4046

41-
# Add the Python SPK's installed lib dir to vim's rpath to allow loading of libpython dynamically if it's available
42-
ADDITIONAL_LDFLAGS = -Wl,--rpath,/var/packages/$(PYTHON_PACKAGE)/target/lib
43-
4447
PLIST_TRANSFORM = sed -e 's%@SPECIFIC_VERSION@%$(SPECIFIC_VERSION)%'
4548

4649
INSTALL_MAKE_OPTIONS = install DESTDIR=$(INSTALL_DIR)
@@ -49,6 +52,7 @@ POST_INSTALL_TARGET = vim_post_install
4952

5053
include ../../mk/spksrc.cross-cc.mk
5154

55+
ifneq ($(findstring $(ARCH),$(ARMv5_ARCHS) $(OLD_PPC_ARCHS)),$(ARCH))
5256
# Only trigger building of dependencies (for the Python config) for targets where it's used
5357
ifeq ($(strip $(filter-out configure compile install plist all,$(MAKECMDGOALS))),)
5458
$(WORK_DIR)/python-cc.mk: depend ;
@@ -61,6 +65,7 @@ PYTHON_EXEC_PREFIX = $(STAGING_INSTALL_PREFIX)
6165
PYTHON_CFG_PATH = $(shell $(STAGING_INSTALL_PREFIX)/bin/python3-config --configdir)
6266

6367
ENV += PYTHONPATH=$(PYTHONPATH)
68+
endif
6469

6570
.PHONY: vim_post_install
6671
vim_post_install:

cross/znc/Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
55
PKG_DIST_SITE = https://znc.in/releases/archive
66
PKG_DIR = $(PKG_NAME)-$(PKG_VERS)
77

8-
BUILD_DEPENDS = cross/python311
8+
BUILD_DEPENDS = cross/$(PYTHON_PACKAGE)
99
DEPENDS = cross/openssl3 cross/libicu cross/zlib
1010

1111
# configure: No compiler with C++11 support was found
@@ -20,6 +20,10 @@ GNU_CONFIGURE = 1
2020
CONFIGURE_ARGS = --enable-python
2121
CONFIGURE_ARGS += --enable-openssl
2222

23+
# For ZNC to build using github-action, enforce adding Python & OpenSSL include directories
24+
ADDITIONAL_CPPFLAGS += -I$(PYTHON_STAGING_PREFIX)/include/python3.$(subst python3,,$(PYTHON_PACKAGE))
25+
ADDITIONAL_CPPFLAGS += -I$(OPENSSL_STAGING_PREFIX)/include/openssl
26+
2327
ifneq ($(wildcard modules/*),)
2428
POST_INSTALL_TARGET = znc_post_install
2529
endif
@@ -38,7 +42,6 @@ PLIST_TRANSFORM = sed -e '/:lib\/znc\/push.so/d'
3842
endif
3943
EXTRA_MODULES += clientbuffer.cpp
4044

41-
4245
# The following extra modules are stored in cross/znc/modules and are built via the znc-buildmod command.
4346
# Adapt as needed (-O is used to overwrite existing files, and to rename to *.cpp where needed).
4447
# call "make znc_update_modules" in cross/znc folder to get the latest versions.
@@ -58,5 +61,5 @@ znc_post_install:
5861
@chmod +x $(WORK_DIR)/$(PKG_DIR)/znc-buildmod
5962
@rm -fr $(WORK_DIR)/modules
6063
@cp -R modules $(WORK_DIR)/
61-
@cd $(WORK_DIR)/modules && PATH=$(WORK_DIR)/$(PKG_DIR) INCLUDES="-I$(STAGING_INSTALL_PREFIX)/include/znc -I$(OPENSSL_STAGING_PREFIX)/include" prefix=$(STAGING_INSTALL_PREFIX) znc-buildmod $(EXTRA_MODULES)
64+
@cd $(WORK_DIR)/modules && PATH=$(WORK_DIR)/$(PKG_DIR) prefix=$(STAGING_INSTALL_PREFIX) znc-buildmod $(EXTRA_MODULES)
6265
@install -m 644 $(WORK_DIR)/modules/*.so $(STAGING_INSTALL_PREFIX)/lib/znc/

mk/spksrc.python.mk

Lines changed: 35 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,37 @@
77
# set default spk/python* path to use
88
PYTHON_PACKAGE_ROOT = $(realpath $(shell pwd)/../$(PYTHON_PACKAGE)/work-$(ARCH)-$(TCVERSION))
99

10+
include ../../mk/spksrc.archs.mk
11+
1012
ifneq ($(wildcard $(PYTHON_PACKAGE_ROOT)),)
1113

12-
# set ld flags to rewrite for the library path used to access
13-
# python libraries provided by the python package at destination
14+
# Export the python package variable so it is usable in cross/*
15+
export PYTHON_PACKAGE
16+
17+
# Set Python installtion prefix directory variables
1418
ifeq ($(strip $(PYTHON_STAGING_PREFIX)),)
1519
export PYTHON_PREFIX = /var/packages/$(PYTHON_PACKAGE)/target
1620
export PYTHON_STAGING_PREFIX = $(realpath $(PYTHON_PACKAGE_ROOT)/install/$(PYTHON_PREFIX))
17-
export ADDITIONAL_LDFLAGS += -Wl,--rpath-link,$(PYTHON_STAGING_PREFIX)/lib -Wl,--rpath,$(PYTHON_PREFIX)/lib
1821
endif
1922

23+
# Set OpenSSL installtion prefix directory variables
2024
ifeq ($(strip $(OPENSSL_STAGING_PREFIX)),)
2125
export OPENSSL_PREFIX = $(PYTHON_PREFIX)
2226
export OPENSSL_STAGING_PREFIX = $(PYTHON_STAGING_PREFIX)
23-
else
24-
export ADDITIONAL_LDFLAGS += -Wl,--rpath-link,$(OPENSSL_STAGING_PREFIX)/lib -Wl,--rpath,$(OPENSSL_PREFIX)/lib
27+
endif
28+
29+
# set build flags including ld to rewrite for the library path
30+
# used to access python package provide libraries at destination
31+
export ADDITIONAL_CFLAGS += -I$(PYTHON_STAGING_PREFIX)/include
32+
export ADDITIONAL_CPPFLAGS += -I$(PYTHON_STAGING_PREFIX)/include
33+
export ADDITIONAL_CXXFLAGS += -I$(PYTHON_STAGING_PREFIX)/include
34+
export ADDITIONAL_LDFLAGS += -L$(PYTHON_STAGING_PREFIX)/lib
35+
export ADDITIONAL_LDFLAGS += -Wl,--rpath-link,$(PYTHON_STAGING_PREFIX)/lib -Wl,--rpath,$(PYTHON_PREFIX)/lib
36+
37+
# similarly, ld to rewrite OpenSSL library path if differs
38+
ifneq ($(OPENSSL_STAGING_PREFIX),$(PYTHON_STAGING_PREFIX))
39+
export ADDITIONAL_LDFLAGS += -L$(OPENSSL_STAGING_PREFIX)/lib
40+
export ADDITIONAL_LDFLAGS += -Wl,--rpath-link,$(OPENSSL_STAGING_PREFIX)/lib -Wl,--rpath,$(OPENSSL_PREFIX)/lib
2541
endif
2642

2743
# get PYTHON_VERSION and other variables
@@ -40,8 +56,10 @@ PYTHON_DEPENDS := $(foreach cross,$(foreach pkg_name,$(shell $(MAKE) dependency-
4056
PRE_DEPEND_TARGET = python_pre_depend
4157

4258
else
59+
ifneq ($(findstring $(ARCH),$(ARMv5_ARCHS) $(OLD_PPC_ARCHS)),$(ARCH))
4360
BUILD_DEPENDS += cross/$(PYTHON_PACKAGE)
4461
endif
62+
endif
4563

4664
include ../../mk/spksrc.spk.mk
4765

@@ -56,6 +74,16 @@ python_pre_depend:
5674
@ln -sf $(PYTHON_PACKAGE_ROOT)/crossenv $(WORK_DIR)/crossenv
5775
@ln -sf $(PYTHON_PACKAGE_ROOT)/python-cc.mk $(WORK_DIR)/python-cc.mk
5876
@$(foreach _done,$(PYTHON_DEPENDS), ln -sf $(_done) $(WORK_DIR) ;)
59-
# EXCEPTIONS: Ensure zlib,bzip2 is always built locally
77+
# EXCEPTION: Ensure zlib is always built locally
6078
@rm -f $(STAGING_INSTALL_PREFIX)/lib/pkgconfig/zlib.pc $(WORK_DIR)/.zlib*
61-
@rm -f $(WORK_DIR)/.bzip2*
79+
# EXCEPTION: Do not symlink cross/* wheel builds
80+
@make --no-print-directory dependency-flat | sort -u | grep -v spk/ | while read depend ; do \
81+
makefile="../../$${depend}/Makefile" ; \
82+
if grep -q spksrc.python-wheel.mk $${makefile} ; then \
83+
pkgstr=$$(grep ^PKG_NAME $${makefile}) ; \
84+
pkgname=$$(echo $${pkgstr#*=} | xargs) ; \
85+
echo "rm -fr work-*/$${pkgname}*\\n work-*/.$${pkgname}-*" ; \
86+
rm -fr work-*/$${pkgname}* \
87+
work-*/.$${pkgname}-* ; \
88+
fi ; \
89+
done

0 commit comments

Comments
 (0)