Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(119471)

Side by Side Diff: Lib/site.py

Issue 23670: Modifications to support iOS as a development platform
Patch Set: Created 3 years, 8 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Lib/plat-ios/regen ('k') | Lib/subprocess.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 """Append module search paths for third-party packages to sys.path. 1 """Append module search paths for third-party packages to sys.path.
2 2
3 **************************************************************** 3 ****************************************************************
4 * This module is automatically imported during initialization. * 4 * This module is automatically imported during initialization. *
5 **************************************************************** 5 ****************************************************************
6 6
7 This will append site-specific paths to the module search path. On 7 This will append site-specific paths to the module search path. On
8 Unix (including Mac OSX), it starts with sys.prefix and 8 Unix (including Mac OSX), it starts with sys.prefix and
9 sys.exec_prefix (if different) and appends 9 sys.exec_prefix (if different) and appends
10 lib/python<version>/site-packages. 10 lib/python<version>/site-packages.
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 if USER_SITE is not None: 259 if USER_SITE is not None:
260 return USER_SITE 260 return USER_SITE
261 261
262 from sysconfig import get_path 262 from sysconfig import get_path
263 263
264 if sys.platform == 'darwin': 264 if sys.platform == 'darwin':
265 from sysconfig import get_config_var 265 from sysconfig import get_config_var
266 if get_config_var('PYTHONFRAMEWORK'): 266 if get_config_var('PYTHONFRAMEWORK'):
267 USER_SITE = get_path('purelib', 'osx_framework_user') 267 USER_SITE = get_path('purelib', 'osx_framework_user')
268 return USER_SITE 268 return USER_SITE
269 elif sys.platform == 'ios':
270 USER_SITE = get_path('purelib', 'ios')
271 return USER_SITE
269 272
270 USER_SITE = get_path('purelib', '%s_user' % os.name) 273 USER_SITE = get_path('purelib', '%s_user' % os.name)
271 return USER_SITE 274 return USER_SITE
272 275
273 def addusersitepackages(known_paths): 276 def addusersitepackages(known_paths):
274 """Add a per user site-package to sys.path 277 """Add a per user site-package to sys.path
275 278
276 Each user has its own python directory with site-packages in the 279 Each user has its own python directory with site-packages in the
277 home directory. 280 home directory.
278 """ 281 """
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
616 sys.exit(2) 619 sys.exit(2)
617 else: 620 else:
618 sys.exit(3) 621 sys.exit(3)
619 else: 622 else:
620 import textwrap 623 import textwrap
621 print(textwrap.dedent(help % (sys.argv[0], os.pathsep))) 624 print(textwrap.dedent(help % (sys.argv[0], os.pathsep)))
622 sys.exit(10) 625 sys.exit(10)
623 626
624 if __name__ == '__main__': 627 if __name__ == '__main__':
625 _script() 628 _script()
OLDNEW
« no previous file with comments | « Lib/plat-ios/regen ('k') | Lib/subprocess.py » ('j') | no next file with comments »

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+