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