MCPcopy Create free account
hub / github.com/pymupdf/PyMuPDF / wrap_get_requires_for_build_wheel

Function wrap_get_requires_for_build_wheel

scripts/test.py:1530–1549  ·  view source on GitHub ↗

Returns space-separated list of required packages. Looks at `dir_`/pyproject.toml and calls `dir_`/setup.py:get_requires_for_build_wheel().

(dir_)

Source from the content-addressed store, hash-verified

1528 assert 0, f'Failed to find "requires" line in {ppt}'
1529
1530def wrap_get_requires_for_build_wheel(dir_):
1531 '''
1532 Returns space-separated list of required
1533 packages. Looks at `dir_`/pyproject.toml and calls
1534 `dir_`/setup.py:get_requires_for_build_wheel().
1535 '''
1536 dir_abs = os.path.abspath(dir_)
1537 ret = list()
1538 ppt = os.path.join(dir_abs, 'pyproject.toml')
1539 if os.path.exists(ppt):
1540 ret += get_pyproject_required(ppt)
1541 if os.path.exists(os.path.join(dir_abs, 'setup.py')):
1542 sys.path.insert(0, dir_abs)
1543 try:
1544 from setup import get_requires_for_build_wheel as foo
1545 for i in foo():
1546 ret.append(i)
1547 finally:
1548 del sys.path[0]
1549 return ' '.join(ret)
1550
1551
1552def venv_in(path=None):

Callers

nothing calls this directly

Calls 2

get_pyproject_requiredFunction · 0.85
appendMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…