Skip to content

Commit d231576

Browse files
committed
Make build more portable.
1 parent 10b6f76 commit d231576

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.github/workflows/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ jobs:
2020
run: /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
2121
- name: Run Build
2222
run: bash build.mac.sh
23+
- name: Cleanup artifact
24+
run: find ~/Library/Nuitka-Python311-arm64 \( -iname '*.o' -o -iname '__pycache__' -o -iname 'link.json' \) | xargs rm -rf
2325
- uses: actions/upload-artifact@v4
2426
with:
2527
name: Nuitka-Python311_mac_arm64

Lib/sysconfig.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,9 +648,11 @@ def get_config_vars(*args):
648648
_CONFIG_VARS['VPATH'] = sys._vpath
649649
if os.name == 'posix':
650650
_init_posix(_CONFIG_VARS)
651+
orig_deps_prefix = _CONFIG_VARS["CONFIG_ARGS"].split("___ORIG_DEPS_PREFIX=", 2)[1].split("___'", 2)[0]
652+
base_deps_location = os.path.join(_PREFIX, "dependency_libs", "base")
651653
for var in _CONFIG_VARS:
652654
if isinstance(_CONFIG_VARS[var], str):
653-
_CONFIG_VARS[var] = _CONFIG_VARS[var].replace(_CONFIG_VARS['prefix'], _PREFIX)
655+
_CONFIG_VARS[var] = _CONFIG_VARS[var].replace(_CONFIG_VARS['prefix'], _PREFIX).replace(orig_deps_prefix, base_deps_location)
654656

655657
# Normalized versions of prefix and exec_prefix are handy to have;
656658
# in fact, these are the standard versions used most places in the

build.mac.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,8 @@ export "LDFLAGS=-L${PREFIX}/lib"
276276
CFLAGS="-g $CFLAGS" \
277277
LDFLAGS="-arch $arch -g -Xlinker $LDFLAGS" \
278278
LIBS="-lffi -lbz2 -lsqlite3 -llzma -lnp_embed -lssl -lcrypto " \
279-
ax_cv_c_float_words_bigendian=no
279+
ax_cv_c_float_words_bigendian=no \
280+
___ORIG_DEPS_PREFIX=${PREFIX}___
280281

281282
make -j 32 \
282283
PROFILE_TASK='./Lib/test/regrtest.py -j 8 -x test_bsddb3 test_compiler test_cpickle test_cprofile test_dbm_dumb test_dbm_ndbm test_distutils test_ensurepip test_gdb test_io test_linuxaudiodev test_multiprocessing test_ossaudiodev test_platform test_pydoc test_socketserver test_subprocess test_sundry test_thread test_threaded_import test_threadedtempfile test_threading test_threading_local test_threadsignals test_xmlrpc test_zipfile' \

0 commit comments

Comments
 (0)