Skip to content

Fixing unknown license error with pip-license#59

Merged
jmwright merged 2 commits intomainfrom
license-fix
Feb 24, 2026
Merged

Fixing unknown license error with pip-license#59
jmwright merged 2 commits intomainfrom
license-fix

Conversation

@jmwright
Copy link
Copy Markdown
Member

Closes #58

@bernhard-42
Copy link
Copy Markdown
Collaborator

Do we need to add the Apache LICENSE file into the wheel? I am not sure ...
Then we would need to copy the file LICENSE to pypi-stubs and cadquery_ocp_proxy and add a tag

license-files = ["LICENSE"]

to [project] in the respective pyproject.toml files


And, to avoid that the Release v7.9.3.1 files get overwritten (or the workflow errors out) when someone starts the workflow manually I woud change

RELEASE_TO_REPO: "true"

to

RELEASE_TO_REPO: "false"

in .github/workflows/build-ocp.yml

Or should I do this independent of this PR (I forgot it yesterday)

@jmwright
Copy link
Copy Markdown
Member Author

Do we need to add the Apache LICENSE file into the wheel?

From what I I've read, the license file is not necessary when the license is in the wheel METADATA via pyproject.yml.

Or should I do this independent of this PR

I would prefer that we do a test build to make sure that this fixes the license issue, but I agree that we do not want to overwrite the artifacts that were already used to create the PyPI release. I can try to do the build locally of one wheel and check that against pip-license, if needed

@bernhard-42
Copy link
Copy Markdown
Collaborator

I would prefer that we do a test build to make sure that this fixes the license issue

Agreed


I've pushed the change to set RELEASE_TO_REPO: "false"
Now the runs will only impact the local run artifacts.


btw. the wheel delocation on Macos can take up to 20 min.
Plus there is a limited amount of MacOS machine one gets per run, serializing the build step.
I typically use Ubuntu and Windows and Python 3.13 only for quick tests


Currently all artefacts are still in cache (cache expires after 7 days), so building OCCT and VTK SDKS and building OCP lib will automatically be skipped (saves hours). The wheels will always be built and the tests also run always. So you can simply start a run manually. There is no automatism for starting runs in this repo, since a run is so massive and I thought to save a few trees ...

@jmwright
Copy link
Copy Markdown
Member Author

The CI run based on this branch is here.

A quick check shows that the license info is in the METADATA file inside of the wheels now. I downloaded and installed a manylinux-3.13 wheel and then ran pip-licenses, and this is what I saw.

$ pip-licenses
 Name                Version      License                                            
 cadquery-ocp        7.9.3.1      Apache Software License                            
 cadquery-ocp-proxy  7.9.3.1      UNKNOWN                                            
 contourpy           1.3.3        BSD License                                        
 cycler              0.12.1       BSD License                                        
 fonttools           4.61.1       MIT                                                
 kiwisolver          1.4.9        BSD License                                        
 matplotlib          3.10.8       Python Software Foundation License                 
 numpy               2.4.2        BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0 
 packaging           26.0         Apache-2.0 OR BSD-2-Clause                         
 pillow              12.1.1       MIT-CMU                                            
 pyparsing           3.3.2        MIT                                                
 python-dateutil     2.9.0.post0  Apache Software License; BSD License               
 six                 1.17.0       MIT License                                        
 vtk                 9.5.2        BSD License

The UNKNOWN license on cadquery-ocp-proxy was because it installed the version that's available via PyPI currently, which does not have this fix. If you download any of the proxy wheels and check their METADATA file, the license is there.

@jmwright
Copy link
Copy Markdown
Member Author

@bernhard-42 @jdegenstein Do you both feel comfortable with this PR being merged?

@bernhard-42
Copy link
Copy Markdown
Collaborator

+1

@jmwright jmwright merged commit 8a03432 into main Feb 24, 2026
144 checks passed
@jmwright jmwright deleted the license-fix branch February 24, 2026 13:58
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.

pip-licenses reports unknown license for cadquery-ocp

2 participants