Skip to content

Instantly share code, notes, and snippets.

@bskinn
Created June 27, 2024 15:43
Show Gist options
  • Save bskinn/e898412226bb55a5d849a7f8712aaae3 to your computer and use it in GitHub Desktop.
Save bskinn/e898412226bb55a5d849a7f8712aaae3 to your computer and use it in GitHub Desktop.
Script to create requirements file from pyproject.toml build-system.requires
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