Skip to content

Commit

Permalink
Add missing tools directory
Browse files Browse the repository at this point in the history
  • Loading branch information
stefsmeets committed Jun 17, 2024
1 parent ddb98aa commit 7991916
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions tools/generate_requirements_txt.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
from __future__ import annotations

from pathlib import Path

import tomllib

this_script = Path(__file__)
root = this_script.parents[1]
pyproject = root / 'pyproject.toml'

with open(pyproject, 'rb') as f:
metadata = tomllib.load(f)
dependencies = metadata['project']['dependencies']

with open('requirements.txt', 'w') as f:
this_script_rel = this_script.relative_to(root)
f.write(f'# generated by {this_script_rel}\n')
f.write('\n'.join(dependencies))
f.write('\n')

0 comments on commit 7991916

Please sign in to comment.