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)
| 339 | return USER_SITE |
| 340 | |
| 341 | def addusersitepackages(known_paths): |
| 342 | """Add a per user site-package to sys.path |
| 343 | |
| 344 | Each user has its own python directory with site-packages in the |
| 345 | home directory. |
| 346 | """ |
| 347 | # get the per user site-package path |
| 348 | # this call will also make sure USER_BASE and USER_SITE are set |
| 349 | _trace("Processing user site-packages") |
| 350 | user_site = getusersitepackages() |
| 351 | |
| 352 | if ENABLE_USER_SITE and os.path.isdir(user_site): |
| 353 | addsitedir(user_site, known_paths) |
| 354 | return known_paths |
| 355 | |
| 356 | def getsitepackages(prefixes=None): |
| 357 | """Returns a list containing all global site-packages directories. |
no test coverage detected