Skip to content

Commit 29994d0

Browse files
committed
unix: always create install/lib/pythonX.Y/lib-dynload/.empty file
In some configurations the directory exists but is empty. We want there to always be a file to ensure the directory is created and Python doesn't complain on startup.
1 parent ccf7aa2 commit 29994d0

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

cpython-unix/build-cpython.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -840,10 +840,8 @@ find ${ROOT}/out/python/install -type d -name __pycache__ -print0 | xargs -0 rm
840840

841841
# Ensure lib-dynload exists, or Python complains on startup.
842842
LIB_DYNLOAD=${ROOT}/out/python/install/lib/python${PYTHON_MAJMIN_VERSION}/lib-dynload
843-
if [ ! -d ${LIB_DYNLOAD} ]; then
844-
mkdir -p ${LIB_DYNLOAD}
845-
touch ${LIB_DYNLOAD}/.empty
846-
fi
843+
mkdir -p "${LIB_DYNLOAD}"
844+
touch "${LIB_DYNLOAD}/.empty"
847845

848846
# Symlink libpython so we don't have 2 copies.
849847
if [ -n "${PYTHON_BINARY_SUFFIX}" ]; then

0 commit comments

Comments
 (0)