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

Function get_pyproject_required

scripts/test.py:1514–1528  ·  view source on GitHub ↗

Returns space-separated names of required packages in pyproject.toml. We do not do a proper parse and rely on the packages being in a single line.

(ppt=None)

Source from the content-addressed store, hash-verified

1512
1513
1514def get_pyproject_required(ppt=None):
1515 '''
1516 Returns space-separated names of required packages in pyproject.toml. We
1517 do not do a proper parse and rely on the packages being in a single line.
1518 '''
1519 if ppt is None:
1520 ppt = os.path.abspath(f'{__file__}/../../pyproject.toml')
1521 with open(ppt) as f:
1522 for line in f:
1523 m = re.match('^requires = \\[(.*)\\]$', line)
1524 if m:
1525 names = m.group(1).replace(',', ' ').replace('"', '')
1526 return names
1527 else:
1528 assert 0, f'Failed to find "requires" line in {ppt}'
1529
1530def wrap_get_requires_for_build_wheel(dir_):
1531 '''

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…