12 lines
243 B
Python
12 lines
243 B
Python
import tomllib
|
|
import json
|
|
|
|
with open('pyproject.toml', 'rb') as f:
|
|
data = tomllib.load(f)
|
|
|
|
deps = data.get('project', {}).get('dependencies', [])
|
|
|
|
with open('requirements.txt', 'w') as f:
|
|
for dep in deps:
|
|
f.write(dep + '\n')
|
|
|