Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include LICENSE file in Python distribution #4048

Merged
merged 3 commits into from
Jan 13, 2024
Merged

Conversation

chrisjbremner
Copy link
Contributor

@chrisjbremner chrisjbremner commented Jan 10, 2024

I have tooling in place to pull the license text from packages using pip-licenses. I noticed, however, that ortools 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 the python.cmake file. By doing so, it will get picked up by setuptools 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 (under license_files).

In addition, I removed the setup_data.py since it seemed like an outdated version of setup.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.

Copy link

google-cla bot commented Jan 10, 2024

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@Mizux Mizux self-assigned this Jan 11, 2024
@Mizux Mizux added Feature Request Missing Feature/Wrapper Lang: Python Python wrapper issue labels Jan 11, 2024
@Mizux
Copy link
Collaborator

Mizux commented Jan 11, 2024

Also in pyproject.toml (since setup.py seems deprecated AFAIK)
https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license

@chrisjbremner
Copy link
Contributor Author

Just checking -- is that a request to convert to using pyproject.toml for packaging instead of setup.py in this PR, or are you simply pointing out that doing this in pyproject.toml is a possibility in case that's used in this project in the future?

@Mizux Mizux merged commit 9ee468a into google:main Jan 13, 2024
100 of 120 checks passed
@Mizux
Copy link
Collaborator

Mizux commented Jan 13, 2024

Just checking -- is that a request to convert to using pyproject.toml for packaging instead of setup.py in this PR, or are you simply pointing out that doing this in pyproject.toml is a possibility in case that's used in this project in the future?

AFAIK setup.py is slowly being deprecated so it is good to know that this LICENSE stuff is also compliant with the toml approach so the day we [have to] migrate we already have a clean shape.

@Mizux Mizux added this to the v9.12 milestone Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature Request Missing Feature/Wrapper Lang: Python Python wrapper issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants