-
hotfix: Include LICENSE and README.md in PyPI package (#2195)
发布于
2025-08-19 10:24:48 +00:00 | 272 次提交 在此版本后已推送到 mainSummary
- Fixes missing LICENSE and README.md files in PyPI package distribution
- Duplicates LICENSE and README.md files from repository root to ragas/
directory - Updates pyproject.toml to properly reference these files in the
package build
Context
This is a hotfix for #2124. The issue occurred because setuptools cannot
access files outside the package directory (e.g.,../LICENSEand
../README.mdpaths don't work). While it would be cleaner to use a
MANIFEST.in file or other approaches, duplicating the files directly
into the ragas/ directory is the most reliable solution that ensures
these critical files are always included in the PyPI distribution.Changes
- Copied LICENSE and README.md from repository root to ragas/LICENSE and
ragas/README.md - Updated ragas/pyproject.toml to reference local copies:
license = {file = "LICENSE"}andreadme = {file = ["README.md"], content-type = "text/markdown"} - Verified both files are properly included in the built distribution
package
Test Plan
- Built source distribution successfully with
uv run python -m build --sdist - Verified LICENSE and README.md are included in the distribution
tarball - Confirmed setuptools recognizes and processes both files correctly
This ensures PyPI users will have access to the license information and
project documentation as expected.下载附件