Changeset 40099 for titan/mediathek
- Timestamp:
- 02/25/17 23:19:18 (6 years ago)
- Location:
- titan/mediathek/localhoster/lib/python2.7
- Files:
-
- 16 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
titan/mediathek/localhoster/lib/python2.7/site.py
r40094 r40099 19 19 resulting directories, if they exist, are appended to sys.path, and 20 20 also inspected for path configuration files. 21 22 For Debian and derivatives, this sys.path is augmented with directories 23 for packages distributed within the distribution. Local addons go 24 into /usr/local/lib/python<version>/dist-packages, Debian addons 25 install into /usr/{lib,share}/python<version>/dist-packages. 26 /usr/lib/python<version>/site-packages is not used. 21 27 22 28 A path configuration file is a file whose name has the form … … 268 274 if ENABLE_USER_SITE and os.path.isdir(user_site): 269 275 addsitedir(user_site, known_paths) 276 if ENABLE_USER_SITE: 277 for dist_libdir in ("local/lib", "lib"): 278 user_site = os.path.join(USER_BASE, dist_libdir, 279 "python" + sys.version[:3], 280 "dist-packages") 281 if os.path.isdir(user_site): 282 addsitedir(user_site, known_paths) 270 283 return known_paths 271 284 … … 289 302 sitepackages.append(os.path.join(prefix, "Lib", "site-packages")) 290 303 elif os.sep == '/': 291 sitepackages.append(os.path.join(prefix, sys.lib,304 sitepackages.append(os.path.join(prefix, "local/lib", 292 305 "python" + sys.version[:3], 293 "site-packages")) 294 sitepackages.append(os.path.join(prefix, sys.lib, "site-python")) 295 if sys.lib != "lib": 296 sitepackages.append(os.path.join(prefix, "lib", 297 "python" + sys.version[:3], 298 "site-packages")) 299 sitepackages.append(os.path.join(prefix, "lib", "site-python")) 306 "dist-packages")) 307 sitepackages.append(os.path.join(prefix, "lib", 308 "python" + sys.version[:3], 309 "dist-packages")) 300 310 else: 301 311 sitepackages.append(prefix) 302 sitepackages.append(os.path.join(prefix, sys.lib, "site-packages"))312 sitepackages.append(os.path.join(prefix, "lib", "site-packages")) 303 313 if sys.platform == "darwin": 304 314 # for framework builds *only* we add the standard Apple … … 442 452 here = os.path.dirname(os.__file__) 443 453 __builtin__.license = _Printer( 444 "license", "See http s://www.python.org/psf/license/",454 "license", "See http://www.python.org/psf/license/", 445 455 ["LICENSE.txt", "LICENSE"], 446 456 [os.path.join(here, os.pardir), here, os.curdir]) -
titan/mediathek/localhoster/lib/python2.7/sysconfig.py
r40094 r40099 8 8 _INSTALL_SCHEMES = { 9 9 'posix_prefix': { 10 'stdlib': '{base}/'+sys.lib+'/python{py_version_short}', 11 'platstdlib': '{platbase}/'+sys.lib+'/python{py_version_short}', 12 'purelib': '{base}/'+sys.lib+'/python{py_version_short}/site-packages', 13 'platlib': '{platbase}/'+sys.lib+'/python{py_version_short}/site-packages', 10 'stdlib': '{base}/lib/python{py_version_short}', 11 'platstdlib': '{platbase}/lib/python{py_version_short}', 12 'purelib': '{base}/lib/python{py_version_short}/site-packages', 13 'platlib': '{platbase}/lib/python{py_version_short}/site-packages', 14 'include': '{base}/include/python{py_version_short}', 15 'platinclude': '{platbase}/include/python{py_version_short}', 16 'scripts': '{base}/bin', 17 'data': '{base}', 18 }, 19 'posix_local': { 20 'stdlib': '{base}/lib/python{py_version_short}', 21 'platstdlib': '{platbase}/lib/python{py_version_short}', 22 'purelib': '{base}/local/lib/python{py_version_short}/dist-packages', 23 'platlib': '{platbase}/local/lib/python{py_version_short}/dist-packages', 24 'include': '{base}/local/include/python{py_version_short}', 25 'platinclude': '{platbase}/local/include/python{py_version_short}', 26 'scripts': '{base}/local/bin', 27 'data': '{base}/local', 28 }, 29 'deb_system': { 30 'stdlib': '{base}/lib/python{py_version_short}', 31 'platstdlib': '{platbase}/lib/python{py_version_short}', 32 'purelib': '{base}/lib/python{py_version_short}/dist-packages', 33 'platlib': '{platbase}/lib/python{py_version_short}/dist-packages', 14 34 'include': '{base}/include/python{py_version_short}', 15 35 'platinclude': '{platbase}/include/python{py_version_short}', … … 66 86 }, 67 87 'posix_user': { 68 'stdlib': '{userbase}/ '+sys.lib+'/python{py_version_short}',69 'platstdlib': '{userbase}/ '+sys.lib+'/python{py_version_short}',70 'purelib': '{userbase}/ '+sys.lib+'/python{py_version_short}/site-packages',71 'platlib': '{userbase}/ '+sys.lib+'/python{py_version_short}/site-packages',88 'stdlib': '{userbase}/lib/python{py_version_short}', 89 'platstdlib': '{userbase}/lib/python{py_version_short}', 90 'purelib': '{userbase}/lib/python{py_version_short}/site-packages', 91 'platlib': '{userbase}/lib/python{py_version_short}/site-packages', 72 92 'include': '{userbase}/include/python{py_version_short}', 73 93 'scripts': '{userbase}/bin', … … 130 150 131 151 if _PYTHON_BUILD: 132 for scheme in ('posix_prefix', 'posix_ home'):152 for scheme in ('posix_prefix', 'posix_local', 'deb_system', 'posix_home'): 133 153 _INSTALL_SCHEMES[scheme]['include'] = '{projectbase}/Include' 134 154 _INSTALL_SCHEMES[scheme]['platinclude'] = '{srcdir}' … … 164 184 def _get_default_scheme(): 165 185 if os.name == 'posix': 166 # the default scheme for posix is posix_prefix 167 return 'posix_prefix' 186 # the default scheme for posix on Debian/Ubuntu is posix_local 187 # FIXME: return dist-packages/posix_prefix only for 188 # is_default_prefix and 'PYTHONUSERBASE' not in os.environ and 'real_prefix' not in sys.__dict__ 189 # is_default_prefix = not prefix or os.path.normpath(prefix) in ('/usr', '/usr/local') 190 return 'posix_local' 168 191 return os.name 169 192 … … 232 255 233 256 # do variable interpolation here 234 while notdone: 235 for name in notdone.keys(): 257 variables = list(notdone.keys()) 258 259 # Variables with a 'PY_' prefix in the makefile. These need to 260 # be made available without that prefix through sysconfig. 261 # Special care is needed to ensure that variable expansion works, even 262 # if the expansion uses the name without a prefix. 263 renamed_variables = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS') 264 265 while len(variables) > 0: 266 for name in tuple(variables): 236 267 value = notdone[name] 237 268 m = _findvar1_rx.search(value) or _findvar2_rx.search(value) 238 if m :269 if m is not None: 239 270 n = m.group(1) 240 271 found = True … … 247 278 # do it like make: fall back to environment 248 279 item = os.environ[n] 280 281 elif n in renamed_variables: 282 if name.startswith('PY_') and name[3:] in renamed_variables: 283 item = "" 284 285 elif 'PY_' + n in notdone: 286 found = False 287 288 else: 289 item = str(done['PY_' + n]) 290 249 291 else: 250 292 done[n] = item = "" 293 251 294 if found: 252 295 after = value[m.end():] … … 255 298 notdone[name] = value 256 299 else: 257 try: value = int(value) 300 try: 301 value = int(value) 258 302 except ValueError: 259 303 done[name] = value.strip() 260 304 else: 261 305 done[name] = value 262 del notdone[name] 306 variables.remove(name) 307 308 if name.startswith('PY_') \ 309 and name[3:] in renamed_variables: 310 311 name = name[3:] 312 if name not in done: 313 done[name] = value 314 315 263 316 else: 264 # bogus variable reference; just drop it since we can't deal 265 del notdone[name] 317 # bogus variable reference (e.g. "prefix=$/opt/python"); 318 # just drop it since we can't deal 319 done[name] = value 320 variables.remove(name) 321 266 322 # strip spurious spaces 267 323 for k, v in done.items(): … … 278 334 if _PYTHON_BUILD: 279 335 return os.path.join(_PROJECT_BASE, "Makefile") 280 return os.path.join(get_ path('platstdlib'), "config", "Makefile")336 return os.path.join(get_config_var('LIBPL'), "Makefile") 281 337 282 338 # Issue #22199: retain undocumented private name for compatibility … … 410 466 inc_dir = _PROJECT_BASE 411 467 else: 412 inc_dir = get_path('platinclude') 468 inc_dir = get_path('platinclude').replace("/usr/local","/usr",1)+(sys.pydebug and "_d" or "") 413 469 return os.path.join(inc_dir, 'pyconfig.h') 414 470 … … 476 532 # the init-function. 477 533 _CONFIG_VARS['userbase'] = _getuserbase() 534 535 multiarch = get_config_var('MULTIARCH') 536 if multiarch: 537 _CONFIG_VARS['multiarchsubdir'] = '/' + multiarch 538 else: 539 _CONFIG_VARS['multiarchsubdir'] = '' 478 540 479 541 if 'srcdir' not in _CONFIG_VARS:
Note: See TracChangeset
for help on using the changeset viewer.