build(pyproject): adopt PEP 639 license metadata#27
build(pyproject): adopt PEP 639 license metadata#27njzjz-bot wants to merge 1 commit intodeepmodeling:mainfrom
Conversation
Use SPDX license expressions and add license-files in pyproject.toml. Update setuptools minimum version where needed so the backend supports PEP 639 license metadata. Authored by OpenClaw (model: gpt-5.4)
📝 WalkthroughWalkthroughUpdates project packaging metadata in Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@pyproject.toml`:
- Line 46: The build-system requirement string is malformed in pyproject.toml
(the requires entry) — replace the single invalid token
"setuptools>=77.0.3-scm>=8" with two separate, valid requirements:
"setuptools>=77.0.3" and "setuptools-scm>=8" so that the PEP 508 parser can
resolve dependencies; update the requires list to include both
"setuptools>=77.0.3" and "setuptools-scm>=8" instead of the combined/incorrect
token.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
|
|
||
| [build-system] | ||
| requires = ["setuptools>=64", "setuptools-scm>=8"] | ||
| requires = ["setuptools>=77.0.3", "setuptools>=77.0.3-scm>=8"] |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
python - <<'PY'
import tomllib
from pathlib import Path
from packaging.requirements import Requirement
data = tomllib.loads(Path("pyproject.toml").read_text(encoding="utf-8"))
reqs = data["build-system"]["requires"]
print("build-system.requires =", reqs)
for r in reqs:
try:
Requirement(r)
print(f"VALID: {r}")
except Exception as exc:
print(f"INVALID: {r} -> {exc}")
PYRepository: deepmodeling/dftio
Length of output: 309
Fix malformed build system requirement that breaks dependency parsing.
Line 46 contains an invalid requirement string: setuptools>=77.0.3-scm>=8. The PEP 508 parser rejects this syntax. The second package should be setuptools-scm>=8 (a separate package), otherwise build backends will fail to resolve dependencies.
Proposed fix
-requires = ["setuptools>=77.0.3", "setuptools>=77.0.3-scm>=8"]
+requires = ["setuptools>=77.0.3", "setuptools-scm>=8"]📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| requires = ["setuptools>=77.0.3", "setuptools>=77.0.3-scm>=8"] | |
| requires = ["setuptools>=77.0.3", "setuptools-scm>=8"] |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@pyproject.toml` at line 46, The build-system requirement string is malformed
in pyproject.toml (the requires entry) — replace the single invalid token
"setuptools>=77.0.3-scm>=8" with two separate, valid requirements:
"setuptools>=77.0.3" and "setuptools-scm>=8" so that the PEP 508 parser can
resolve dependencies; update the requires list to include both
"setuptools>=77.0.3" and "setuptools-scm>=8" instead of the combined/incorrect
token.
Problem
project.licensemetadata.licensepluslicense-files.Change
project.license = {{file/text = ...}}with an SPDX expression.project.license-files.Notes
Authored by OpenClaw (model: gpt-5.4)
Summary by CodeRabbit