• Home
  • Raw
  • Download

Lines Matching +full:packages +full:- +full:dir

1 """Append module search paths for third-party packages to sys.path.
7 This will append site-specific paths to the module search path. On
10 lib/python<version>/site-packages.
12 prefixes directly, as well as with lib/site-packages appended. The
18 it is also checked for site-packages (sys.base_prefix and
21 the key "include-system-site-packages" set to anything other than "false"
22 (case-insensitive), the system-level prefixes will still also be
23 searched for site-packages; otherwise they won't.
25 All of the resulting site-specific directories, if they exist, are
31 to be added to sys.path. Non-existing directories (or
32 non-directories) are never added to sys.path; no directory is added to
37 /usr/local and there is a directory /usr/local/lib/python2.5/site-packages
54 /usr/local/lib/python2.5/site-packages/bar
55 /usr/local/lib/python2.5/site-packages/foo
64 isolated mode (-I) disables automatic readline configuration.
68 site-specific customizations. If this import fails with an
78 # Prefixes for site-packages; add additional prefixes like /usr/local here
80 # Enable per user site-packages directory
97 dir = os.path.join(*paths)
99 dir = os.path.abspath(dir)
102 return dir, os.path.normcase(dir)
117 continue # don't mess with a PEP 302-supplied __file__
135 for dir in sys.path:
136 # Filter out duplicate paths (on case-insensitive file systems also
139 dir, dircase = makepath(dir)
141 L.append(dir)
161 """Process a .pth file within the site-packages directory:
189 dir, dircase = makepath(sitedir, line)
190 if not dircase in known_paths and os.path.exists(dir):
191 sys.path.append(dir)
293 return f'{userbase}\\Python{ver_nodot}\\site-packages'
296 return f'{userbase}/lib/python/site-packages'
298 return f'{userbase}/lib/python{version[0]}.{version[1]}/site-packages'
315 """Returns the user-specific site-packages directory path.
332 """Add a per user site-package to sys.path
334 Each user has its own python directory with site-packages in the
337 # get the per user site-package path
339 _trace("Processing user site-packages")
347 """Returns a list containing all global site-packages directories.
350 this function will find its `site-packages` subdirectory depending on the
372 "site-packages")
376 sitepackages.append(os.path.join(prefix, "Lib", "site-packages"))
380 """Add site-packages to sys.path"""
381 _trace("Processing global site-packages")
396 eof = 'Ctrl-Z plus Return'
398 eof = 'Ctrl-D (i.e. EOF)'
484 # bpo-19891, bpo-41193: Home directory does not exist
485 # or is not writable, or the filesystem is read-only.
515 # Issue 25185: Use UTF-8, as that's what the venv module uses when
517 with open(virtual_conf, encoding='utf-8') as f:
523 if key == 'include-system-site-packages':
530 # Doing this here ensures venv takes precedence over user-site
585 """Add standard site-specific directories to the module search path.
588 unless the python interpreter was started with the -S flag.
613 # Prevent extending of sys.path when python was started with -S and
620 %s [--user-base] [--user-site]
626 Exit codes with --user-base or --user-site:
627 0 - user site directory is enabled
628 1 - user site directory is disabled by user
629 2 - user site directory is disabled by super user
631 >2 - unknown error
638 for dir in sys.path:
639 print(" %r," % (dir,))
652 if '--user-base' in args:
654 if '--user-site' in args: