MCPcopy Index your code
hub / github.com/pymupdf/PyMuPDF / sysconfig_python_flags

Function sysconfig_python_flags

pipcl.py:3490–3512  ·  view source on GitHub ↗

Returns include paths and library directory for Python. Uses sysconfig.*(), overridden by environment variables PIPCL_SYSCONFIG_PATH_include, PIPCL_SYSCONFIG_PATH_platinclude and PIPCL_SYSCONFIG_CONFIG_VAR_LIBDIR if set.

()

Source from the content-addressed store, hash-verified

3488
3489
3490def sysconfig_python_flags():
3491 '''
3492 Returns include paths and library directory for Python.
3493
3494 Uses sysconfig.*(), overridden by environment variables
3495 PIPCL_SYSCONFIG_PATH_include, PIPCL_SYSCONFIG_PATH_platinclude and
3496 PIPCL_SYSCONFIG_CONFIG_VAR_LIBDIR if set.
3497 '''
3498 include1_ = os.environ.get('PIPCL_SYSCONFIG_PATH_include') or sysconfig.get_path('include')
3499 include2_ = os.environ.get('PIPCL_SYSCONFIG_PATH_platinclude') or sysconfig.get_path('platinclude')
3500 ldflags_ = os.environ.get('PIPCL_SYSCONFIG_CONFIG_VAR_LIBDIR') or sysconfig.get_config_var('LIBDIR')
3501
3502 includes_ = [include1_]
3503 if include2_ != include1_:
3504 includes_.append(include2_)
3505 if windows():
3506 includes_ = [f'/I"{i}"' for i in includes_]
3507 ldflags_ = f'/LIBPATH:"{ldflags_}"'
3508 else:
3509 includes_ = [f'-I {i}' for i in includes_]
3510 ldflags_ = f'-L {ldflags_}'
3511 includes_ = ' '.join(includes_)
3512 return includes_, ldflags_
3513
3514
3515def venv_in(path=None):

Callers 2

__init__Method · 0.85
pipcl.pyFile · 0.85

Calls 3

windowsFunction · 0.85
getMethod · 0.45
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…