Include LICENSE file in Python distribution #4048
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have tooling in place to pull the license text from packages using
pip-licenses
. I noticed, however, thatortools
does not include the license file in its Python distribution, and as a result, it is difficult to pull in the license file from the project, especially since there is no link back to the Github repo in the Python package (https://developers.google.com/optimization/
is listed as the package URL).I am proposing including the
LICENSE
file in the Python distribution by copying the License in as part of thepython.cmake
file. By doing so, it will get picked up bysetuptools
since it defaults to including files that match the following patterns:'LICEN[CS]E*', 'COPYING*', 'NOTICE*', 'AUTHORS*'
as described in code here or in the docs here (underlicense_files
).In addition, I removed the
setup_data.py
since it seemed like an outdated version ofsetup.py.in
which appears to be what has been used recently. Please correct me if I shouldn't have removed this.I will note that I have yet to be able to test this since I don't have the full toolchain set up.