File tree Expand file tree Collapse file tree 3 files changed +36
-0
lines changed Expand file tree Collapse file tree 3 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ WORKDIR /srv/
77RUN pip install twine setuptools
88
99COPY ./requirements.txt /srv/python-third-party-license-file-generator/requirements.txt
10+ COPY ./pyproject.toml /srv/python-third-party-license-file-generator/pyproject.toml
1011
1112RUN pip install -r /srv/python-third-party-license-file-generator/requirements.txt
1213
Original file line number Diff line number Diff line change 22
33set -e
44
5+ # Test parse and generation of THIRDPARTYLICENSES from requirements.txt
56python -u -m third_party_license_file_generator \
67 -r /srv/python-third-party-license-file-generator/requirements.txt \
78 -p " $( which python) " \
@@ -16,3 +17,24 @@ if ! test -e THIRDPARTYLICENSES; then
1617fi
1718
1819python3 /srv/python-third-party-license-file-generator/check_third_party_licenses.py
20+
21+ rm THIRDPARTYLICENSES
22+
23+ # Test parse and generation of THIRDPARTYLICENSES from pyproject.toml (if Python version is 3.x)
24+ if python -c " import sys; sys.exit(0 if sys.version_info.major >= 3 else 1)" 2> /dev/null
25+ then
26+ python -u -m third_party_license_file_generator \
27+ -r /srv/python-third-party-license-file-generator/pyproject.toml \
28+ -p " $( which python) " \
29+ --do-not-skip-not-required-packages \
30+ --permit-gpl \
31+ --skip-prefix twine
32+
33+ if ! test -e THIRDPARTYLICENSES; then
34+ echo " error: couldn't find THIRDPARTYLICENSES- something has gone badly wrong"
35+
36+ exit 1
37+ fi
38+
39+ python3 /srv/python-third-party-license-file-generator/check_third_party_licenses.py
40+ fi
Original file line number Diff line number Diff line change 1+ [project ]
2+ name = " python-third-party-license-file-generator"
3+ version = " 0.1.0"
4+ description = " The Python third_party_license_file_generator is aimed at distilling down the appropriate license for one or many pip \" requirements\" files into a single file; it supports Python2.7 and Python3."
5+ readme = " README.md"
6+ requires-python = " >=3.9"
7+ dependencies = [
8+ " dom-toml>=2.1.0 ; python_full_version >= '3'" ,
9+ " pyyaml<5.4 ; python_full_version < '3'" ,
10+ " pyyaml>=5.4 ; python_full_version >= '3'" ,
11+ " requests>=2.25 ; python_full_version < '3'" ,
12+ " requests>=2.25 ; python_full_version >= '3'" ,
13+ ]
You can’t perform that action at this time.
0 commit comments