You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fory.apache.org by "pjfanning (via GitHub)" <gi...@apache.org> on 2026/10/06 10:57:13 UTC
[PR] fix(python): ship LICENSE and NOTICE in pyfory wheels [fory]
pjfanning opened a new pull request, #4128:
URL: https://github.com/apache/fory/pull/4128
## Why?
`python/pyproject.toml` declares `license = {file = "LICENSE"}`, but `python/LICENSE` doesn't exist and nothing in the build copies one in. setuptools only prints `File '.../LICENSE' cannot be found` and carries on. As a result, every published pyfory wheel has no LICENSE or NOTICE file. I checked the manylinux and macOS wheels for 1.7.6, 1.0.0 and 0.13.0 on PyPI. Their METADATA has no `License` field either, only the classifier.
ASF policy requires convenience binaries to ship with LICENSE and NOTICE. The wheels also bundle third-party code whose licences need to go with it.
## What does this PR do?
Adds `python/LICENSE` and `python/NOTICE`, following the existing per-package files (`java/LICENSE`, `go/fory/LICENSE`, `dart/packages/fory/LICENSE`). The LICENSE contains the Apache-2.0 text (identical to the root LICENSE) plus the third-party code the wheel actually contains:
| Component | Licence | Where it ends up in the wheel |
|---|---|---|
| dataclasses | Apache-2.0 | `pyfory/type_util.py` (`dataslots`) |
| Fluent Python example code | MIT (full text included) | `pyfory/type_util.py` (`record_class_factory`) |
| abseil-cpp (`cpp/fory/thirdparty/flat_hash_map.h`) | Apache-2.0 | `serialization` extension |
| smhasher (`cpp/fory/thirdparty/MurmurHash3.*`) | Public domain | `mmh3` and `serialization` extensions |
I worked out the list from the Bazel targets for `//:cp_fory_so`. They link only Fory's own C++ plus those two vendored third-party files; there are no external C++ libraries. NOTICE carries the dataclasses copyright notice, which the root NOTICE already includes.
No build change is needed: setuptools adds `LICENSE*` and `NOTICE*` from the project directory to the wheel's `dist-info`. I checked this by running `BAZEL_BUILD_EXT=False python setup.py bdist_wheel` with both setuptools ranges the project pins:
- setuptools 84.0.0: `dist-info/licenses/LICENSE` and `dist-info/licenses/NOTICE`, plus `License-File: LICENSE` and `License-File: NOTICE` in METADATA
- setuptools 70.3.0 (the Python 3.8 range): `dist-info/LICENSE` and `dist-info/NOTICE`, plus the same `License-File` entries
## Related issues
- Related to #4126. #4127 adds the Fluent Python attribution to the source release LICENSE; this PR covers the wheel.
## Does this PR introduce any user-facing change?
- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org
Re: [PR] fix(python): ship LICENSE and NOTICE in pyfory wheels [fory]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning closed pull request #4128: fix(python): ship LICENSE and NOTICE in pyfory wheels
URL: https://github.com/apache/fory/pull/4128
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org
Re: [PR] fix(python): ship LICENSE and NOTICE in pyfory wheels [fory]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on PR #4128:
URL: https://github.com/apache/fory/pull/4128#issuecomment-6014773718
Merged into #4127.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fory.apache.org
For additional commands, e-mail: commits-help@fory.apache.org