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

More licensing fun: Automated correction edition #58

Merged
merged 19 commits into from
May 13, 2024

Conversation

schuylermartin45
Copy link
Collaborator

@schuylermartin45 schuylermartin45 commented May 10, 2024

I think we're just getting started...

This comes out of discussions had in #45, #55, #57 and in Slack.

This PR introduces a new SpdxUtils library that provides a more advanced mechanism for correcting SPDX licenses than the simple patch-table introduced in #55

From local testing, this PR reduces the number of SPDX errors from rattler-build in the anaconda_recipes_01 test recipe set from ~160 (prior to #55) to 25.

This work is far from perfect, but I think it is a "good enough" solution for the time being. We'll learn and improve our approach with this starting point.

@schuylermartin45 schuylermartin45 requested a review from a team as a code owner May 10, 2024 20:43
@wolfv
Copy link

wolfv commented May 11, 2024

nice work!

Copy link
Member

@jezdez jezdez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

w00t!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tiny nit, licenses (plural) is slightly more descriptive ;)

pyproject.toml Outdated
@@ -3,14 +3,11 @@ requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"

[tool.setuptools]
package-dir = {"" = "conda_recipe_manager"}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line caused it to error looking for conda_recipe_manager.tests as if the top level directory was what you got when "import conda_recipe_manager"


[tool.setuptools.package-data]
"conda_recipe_manager" = ["py.typed", "*.json"]
exclude = ["tests"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This exclude prevents it from packaging "import tests" as a new top-level Python module when this is installed.

py.typed and *.json appear to be included in the wheel without the package-data configuration.

@schuylermartin45 schuylermartin45 merged commit cf0a06e into main May 13, 2024
11 checks passed
@schuylermartin45 schuylermartin45 deleted the smartin_more_licensing_fun branch May 13, 2024 14:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants