77This will append site-specific paths to the module search path. On
88Unix (including Mac OSX), it starts with sys.prefix and
99sys.exec_prefix (if different) and appends
10- lib/python<version>/site-packages as well as lib/site-python .
10+ lib/python<version>/site-packages.
1111On other platforms (such as Windows), it tries each of the
1212prefixes directly, as well as with lib/site-packages appended. The
1313resulting directories, if they exist, are appended to sys.path, and
1414also inspected for path configuration files.
1515
1616If a file named "pyvenv.cfg" exists one directory above sys.executable,
1717sys.prefix and sys.exec_prefix are set to that directory and
18- it is also checked for site-packages and site-python (sys.base_prefix and
18+ it is also checked for site-packages (sys.base_prefix and
1919sys.base_exec_prefix will always be the "real" prefixes of the Python
2020installation). If "pyvenv.cfg" (a bootstrap configuration file) contains
2121the key "include-system-site-packages" set to anything other than "false"
@@ -285,8 +285,7 @@ def addusersitepackages(known_paths):
285285 return known_paths
286286
287287def getsitepackages (prefixes = None ):
288- """Returns a list containing all global site-packages directories
289- (and possibly site-python).
288+ """Returns a list containing all global site-packages directories.
290289
291290 For each directory present in ``prefixes`` (or the global ``PREFIXES``),
292291 this function will find its `site-packages` subdirectory depending on the
@@ -307,7 +306,6 @@ def getsitepackages(prefixes=None):
307306 sitepackages .append (os .path .join (prefix , "lib" ,
308307 "python" + sys .version [:3 ],
309308 "site-packages" ))
310- sitepackages .append (os .path .join (prefix , "lib" , "site-python" ))
311309 else :
312310 sitepackages .append (prefix )
313311 sitepackages .append (os .path .join (prefix , "lib" , "site-packages" ))
@@ -323,14 +321,9 @@ def getsitepackages(prefixes=None):
323321 return sitepackages
324322
325323def addsitepackages (known_paths , prefixes = None ):
326- """Add site-packages (and possibly site-python) to sys.path"""
324+ """Add site-packages to sys.path"""
327325 for sitedir in getsitepackages (prefixes ):
328326 if os .path .isdir (sitedir ):
329- if "site-python" in sitedir :
330- import warnings
331- warnings .warn ('"site-python" directories will not be '
332- 'supported in 3.5 anymore' ,
333- DeprecationWarning )
334327 addsitedir (sitedir , known_paths )
335328
336329 return known_paths
0 commit comments