Defect #18743
openThe sitecustomize directory created by bv_maker conflicts with casa-distro “custom projects
Status:
New
Priority:
Normal
Assignee:
-
Category:
brainvisa-cmake
Target version:
-
Start date:
21/08/2018
Due date:
% Done:
0%
Estimated time:
Resolution:
Updated by Leprince, Yann over 5 years ago
When compiling a custom project in casa-distro, a sitecustomize
package is created by bv_maker in the /casa/custom/build/python
, which hides the sitecustomize
package contained in /casa/build/python
. The latter is executed explicitly with exec
, but it fails to import sitecustomize.bv_maker_pure_python
because Python will search for it in /casa/custom/build/python
.
Suggested fix: replace the sitecustomize package by a sitecustomize.py
module (the Python docs suggest that sitecustomize
should be a module, not a package), put the bv_maker_pure_python.pth
file directly in /casa/build/python
, and simply use site.addsitedir
to process the .pth
file (see https://docs.python.org/2.6/library/site.html#site.addsitedir).