MCPcopy Index your code
hub / github.com/python/cpython / configure_host_python

Function configure_host_python

Android/android.py:233–270  ·  view source on GitHub ↗
(context, host=None)

Source from the content-addressed store, hash-verified

231
232
233def configure_host_python(context, host=None):
234 if host is None:
235 host = context.host
236 if context.clean:
237 clean(host)
238
239 host_dir = subdir(host, create=True)
240 prefix_dir = host_dir / "prefix"
241 if not prefix_dir.exists():
242 prefix_dir.mkdir()
243 cache_dir = (
244 Path(context.cache_dir).resolve()
245 if context.cache_dir
246 else CROSS_BUILD_DIR / "downloads"
247 )
248 unpack_deps(host, prefix_dir, cache_dir)
249
250 os.chdir(host_dir)
251 command = [
252 # Basic cross-compiling configuration
253 relpath(PYTHON_DIR / "configure"),
254 f"--host={host}",
255 f"--build={sysconfig.get_config_var('BUILD_GNU_TYPE')}",
256 f"--with-build-python={build_python_path()}",
257 "--without-ensurepip",
258
259 # Android always uses a shared libpython.
260 "--enable-shared",
261 "--without-static-libpython",
262
263 # Dependent libraries. The others are found using pkg-config: see
264 # android-env.sh.
265 f"--with-openssl={prefix_dir}",
266 ]
267
268 if context.args:
269 command.extend(context.args)
270 run(command, host=host)
271
272
273def make_host_python(context, host=None):

Callers 1

build_targetsFunction · 0.70

Calls 11

PathClass · 0.90
relpathFunction · 0.90
cleanFunction · 0.70
subdirFunction · 0.70
unpack_depsFunction · 0.70
build_python_pathFunction · 0.70
runFunction · 0.70
existsMethod · 0.45
mkdirMethod · 0.45
resolveMethod · 0.45
extendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…