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

Unified Diff: Lib/sysconfig.py

Issue 23670: Modifications to support iOS as a development platform
Patch Set: Created 3 years, 8 months ago
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Lib/subprocess.py ('k') | Lib/test/libregrtest/main.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/sysconfig.py Tue Mar 01 10:26:10 2016 +0200
+++ b/Lib/sysconfig.py Wed Mar 02 00:01:35 2016 +0000
@@ -73,16 +73,25 @@ from os.path import pardir, realpath
'stdlib': '{userbase}/lib/python',
'platstdlib': '{userbase}/lib/python',
'purelib': '{userbase}/lib/python/site-packages',
'platlib': '{userbase}/lib/python/site-packages',
'include': '{userbase}/include',
'scripts': '{userbase}/bin',
'data': '{userbase}',
},
+ 'ios': {
+ 'stdlib': '{installed_base}/lib/python%s' % sys.version[:3],
+ 'platstdlib': '{installed_base}/lib/python%s' % sys.version[:3],
+ 'purelib': '{installed_base}/lib/python%s/site-packages' % sys.version[:3],
+ 'platlib': '{installed_base}/lib/python%s/site-packages' % sys.version[:3],
+ 'include': '{installed_base}/include',
+ 'scripts': '{installed_base}/bin',
+ 'data': '{installed_base}/Resources',
+ },
}
_SCHEME_KEYS = ('stdlib', 'platstdlib', 'purelib', 'platlib', 'include',
'scripts', 'data')
# FIXME don't rely on sys.version here, its format is an implementation detail
# of CPython, use sys.version_info or sys.hexversion
_PY_VERSION = sys.version.split()[0]
@@ -169,16 +178,18 @@ def _expand_vars(scheme, vars):
res[key] = os.path.normpath(_subst_vars(value, vars))
return res
def _get_default_scheme():
if os.name == 'posix':
# the default scheme for posix is posix_prefix
return 'posix_prefix'
+ elif sys.platform == 'ios':
+ return 'ios'
return os.name
def _getuserbase():
env_base = os.environ.get("PYTHONUSERBASE", None)
def joinuser(*args):
return os.path.expanduser(os.path.join(*args))
@@ -193,16 +204,21 @@ def _getuserbase():
if sys.platform == "darwin":
framework = get_config_var("PYTHONFRAMEWORK")
if framework:
if env_base:
return env_base
else:
return joinuser("~", "Library", framework, "%d.%d" %
sys.version_info[:2])
+ elif sys.platform == 'ios':
+ if env_base:
+ return env_base
+ else:
+ return _BASE_PREFIX
if env_base:
return env_base
else:
return joinuser("~", ".local")
def _parse_makefile(filename, vars=None):
« no previous file with comments | « Lib/subprocess.py ('k') | Lib/test/libregrtest/main.py » ('j') | no next file with comments »

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