File tree 2 files changed +12
-0
lines changed 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -111,12 +111,19 @@ function(unicmake_setuppy ACTION PACKAGE_NAME OUTVAR)
111
111
set (OUT ${OUTDIR} /${ACTION} .stamp)
112
112
set (${OUTVAR} ${OUT} PARENT_SCOPE)
113
113
114
+ # sitecustomize.py is needed due to
115
+ # https://github.com/pypa/setuptools/issues/2612
116
+ # See also:
117
+ # https://github.com/pypa/setuptools/issues/2589
118
+ # https://github.com/pypa/setuptools/commit/cb962021c53b7130bf0a1792f75678efcc0724be#diff-edb74f28afd2515905b8e250003a801b34ace1931df0ea9ade39d10781c7168cR209-R213
114
119
add_custom_command (
115
120
COMMAND rm -rf ${OUTDIR}
116
121
COMMAND ${CMAKE_COMMAND} -E make_directory ${OUTDIR}
117
122
COMMAND ${CMAKE_COMMAND} -E make_directory ${FULL_SITEDIR}
118
123
COMMAND
119
124
${CMAKE_COMMAND} -E env PYTHONPATH=$ENV{PYTHONPATH} :${FULL_SITEDIR} ${Python3_EXECUTABLE} setup.py ${ACTION} --prefix ${INSTALL_PREFIX}
125
+ COMMAND
126
+ ${CMAKE_COMMAND} -E copy ${_THIS_MODULE_BASE_DIR} /sitecustomize.py ${FULL_SITEDIR}
120
127
COMMAND touch ${OUT}
121
128
OUTPUT ${OUT}
122
129
DEPENDS
Original file line number Diff line number Diff line change
1
+ import site
2
+ import pathlib
3
+
4
+ here = pathlib .Path (__file__ ).parent
5
+ site .addsitedir (str (here ))
You can’t perform that action at this time.
0 commit comments