Closed fhg-isi closed 3 months ago
I don’t think it supports it I’m afraid- you could maybe write some hacky to create a requirements.txt from your pyprojects.toml and see if that worked.
Otherwise we’d gladly welcome a pull request adding this feature!
Thank you for the reply. Instead of generating requirements.txt from pyproject.toml I generate it now from the imports using pipreqs --force .
Here is the corresponding github workflow:
name: back_end_third_party_license_file_generation
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: setup python
uses: actions/setup-python@v3
with:
python-version: 3.11
- name: install dependencies
run: |
cd back_end
pip install .[license]
- name: generate temp requirements.txt
run: |
cd back_end
pipreqs --force .
- name: show python path
run: |
which python3
- name: third party license file generation
run: |
cd back_end
python3 -m third_party_license_file_generator -r requirements.txt -o THIRDPARTY.md -p /opt/hostedtoolcache/Python/3.11.7/x64/bin/python3
- name: delete temp requirements.txt file
run: |
cd back_end
rm requirements.txt
- name: push changes
# also see https://github.com/stefanzweifel/git-auto-commit-action
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: updated third party license file \#1
How to generate THIRDPARTYLICENSES file from pyproject.toml instead of requirements.txt?