Lines Matching refs:site
24 import site
36 if site.ENABLE_USER_SITE and not os.path.isdir(site.USER_SITE):
39 os.makedirs(site.USER_SITE)
41 site.addsitedir(site.USER_SITE)
45 % (site.USER_SITE, exc))
65 self.old_base = site.USER_BASE
66 self.old_site = site.USER_SITE
67 self.old_prefixes = site.PREFIXES
73 site.USER_BASE = self.old_base
74 site.USER_SITE = self.old_site
75 site.PREFIXES = self.old_prefixes
84 abs_dir, norm_dir = site.makepath(*path_parts)
92 dir_set = site._init_pathinfo()
93 for entry in [site.makepath(path)[1] for path in sys.path
103 self.assertIn(site.makepath(pth_file.good_dir_path)[0], sys.path)
116 site.addpackage(pth_file.base_dir, pth_file.filename, set())
136 site.addpackage(pth_dir, pth_fn, set())
151 site.addpackage(pth_dir, pth_fn, set())
165 site.addpackage(pth_dir, pth_fn, set())
181 site.addsitedir(pth_file.base_dir, set())
186 @unittest.skipUnless(site.ENABLE_USER_SITE, "requires access to PEP 370 "
189 usersite = site.USER_SITE
220 site.USER_BASE = None
221 user_base = site.getuserbase()
224 self.assertEqual(site.USER_BASE, user_base)
227 site.USER_BASE = None
233 self.assertTrue(site.getuserbase().startswith('xoxo'),
234 site.getuserbase())
237 site.USER_SITE = None
238 site.USER_BASE = None
239 user_site = site.getusersitepackages()
242 self.assertEqual(site.USER_SITE, user_site)
243 self.assertTrue(user_site.startswith(site.USER_BASE), user_site)
246 site.PREFIXES = ['xoxo']
247 dirs = site.getsitepackages()
338 site.abs__file__()
351 site.removeduppaths()