Shouldn't Python stdlib C extensions be in lib-dynload rather than site-packages?
Is there a reason standard Python C modules such as _hashlib.so are dropped into the site-packages directory when installed? I realize this doesn't matter for most uses, as the module is eventually found on the path regardless, but it can cause bugs on the edge. I just hit a problem when attempting to use virtualenv [1] with the MacPorts Python. It symlinks the basic stdlib modules and directories like lib-dynload, re, csv, etc so you can have a virtual Python working directory and even install other modules (even eggs) there, etc. The problem is, it fails to import hashlib because it should be found in lib-dynload but it rather in site-packages with the other "user-installed" modules. Anyways, it works fine after I symlink the packages into lib-dynload, but this might be something to fix in MacPorts regardless, no? Thanks, Brett [1] http://pypi.python.org/pypi/virtualenv
participants (1)
-
Brett Hoerner