tools/src/py-mkopensource/README.md
py-mkopensource is a program for generating reports of the libraries
used by a Python application, in order to be in compliance with the
attribution requirements of various opensource licenses.
py-mkopensource takes as input the dependencies generated by
pip show, and produces a report in either JSON or markdown output.
py-mkopensource requires pip and pip-tools.
To generate the list of dependencies from requirements.txt, run the
following commands:
pip3 --disable-pip-version-check install -r requirements.txt
pip3 --disable-pip-version-check freeze --exclude-editable | cut -d= -f1 | xargs pip show | sed 's/^---$//' >dependenncies.txt
echo '' >>dependenncies.txt
cat dependenncies.txt | ./py-mkopensource
Parameter --output-type controls the output format.
--output-type=markdownProgram outputs dependency information in Markdown format.
This is the default value.
--output-type=jsonProgram outputs dependency information in JSON format