Created
June 27, 2024 15:43
-
-
Save bskinn/e898412226bb55a5d849a7f8712aaae3 to your computer and use it in GitHub Desktop.
Script to create requirements file from pyproject.toml build-system.requires
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tomllib | |
from pathlib import Path | |
requirements = tomllib.loads(Path('pyproject.toml').read_text())['build-system']['requires'] | |
Path('requirements-build.txt').write_text('\n'.join(requirements)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment