Skip to content

Commit c8abf82

Browse files
author
Simon Rit
committed
BUG: Clean-up ._* files in venv to fix Intel MacOS issue
dot_clean recursively merges all ._* files with their corresponding native files. Applying it in `macpython-build-tarball.sh` removes them from future tar balls, applying it in `scripts/macpython-build-module-wheels.sh` addresses the ITK v5.4.3 Intel MacOS error: ``` + /Users/svc-dashboard/D/P/ITKPythonPackage/scripts/../venvs/3.11/bin/python3 -m pip install --no-cache delocate Fatal Python error: init_import_site: Failed to import the site module Python runtime state: initialized Traceback (most recent call last): File "<frozen importlib._bootstrap>", line 1176, in _find_and_load File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 690, in _load_unlocked File "<frozen importlib._bootstrap>", line 980, in exec_module File "<frozen site>", line 616, in <module> File "<frozen site>", line 599, in main File "<frozen site>", line 531, in venv File "<frozen site>", line 384, in addsitepackages File "<frozen site>", line 226, in addsitedir File "<frozen site>", line 179, in addpackage File "<frozen codecs>", line 322, in decode UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa3 in position 45: invalid start byte ```
1 parent 3ad3bf0 commit c8abf82

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

scripts/macpython-build-module-wheels.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ fi
7171

7272
VENV="${VENVS[0]}"
7373
Python3_EXECUTABLE=${VENV}/bin/python3
74+
dot_clean ${VENV}
7475
${Python3_EXECUTABLE} -m pip install --no-cache delocate
7576
DELOCATE_LISTDEPS=${VENV}/bin/delocate-listdeps
7677
DELOCATE_WHEEL=${VENV}/bin/delocate-wheel

scripts/macpython-build-tarball.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ if test $(arch) == "arm64"; then
1313
fi
1414

1515
pushd /Users/svc-dashboard/D/P > /dev/null
16+
dot_clean ITKPythonPackage
1617
tar -cf ITKPythonBuilds-macosx${arch_postfix}.tar \
1718
ITKPythonPackage/ITK-* \
1819
${tbb_contents} \

0 commit comments

Comments
 (0)