Add a per user site-package to sys.path Each user has its own python directory with site-packages in the home directory.
(known_paths)
| 368 | return USER_SITE |
| 369 | |
| 370 | def addusersitepackages(known_paths): |
| 371 | """Add a per user site-package to sys.path |
| 372 | |
| 373 | Each user has its own python directory with site-packages in the |
| 374 | home directory. |
| 375 | """ |
| 376 | # get the per user site-package path |
| 377 | # this call will also make sure USER_BASE and USER_SITE are set |
| 378 | _trace("Processing user site-packages") |
| 379 | user_site = getusersitepackages() |
| 380 | |
| 381 | if ENABLE_USER_SITE and os.path.isdir(user_site): |
| 382 | addsitedir(user_site, known_paths) |
| 383 | return known_paths |
| 384 | |
| 385 | def getsitepackages(prefixes=None): |
| 386 | """Returns a list containing all global site-packages directories. |
no test coverage detected