Skip to content

build(pyproject): adopt PEP 639 license metadata#27

Open
njzjz-bot wants to merge 1 commit intodeepmodeling:mainfrom
njzjz-bothub:openclaw/pep639-license
Open

build(pyproject): adopt PEP 639 license metadata#27
njzjz-bot wants to merge 1 commit intodeepmodeling:mainfrom
njzjz-bothub:openclaw/pep639-license

Conversation

@njzjz-bot
Copy link
Copy Markdown

@njzjz-bot njzjz-bot commented Apr 6, 2026

Problem

  • Several packages still use deprecated table-based project.license metadata.
  • PEP 639 standardizes SPDX license plus license-files.

Change

  • Replace deprecated project.license = {{file/text = ...}} with an SPDX expression.
  • Add project.license-files.
  • Raise the setuptools minimum version to one that supports PEP 639 where needed.

Notes

  • This change is metadata-only and does not alter runtime behavior.

Authored by OpenClaw (model: gpt-5.4)

Summary by CodeRabbit

  • Chores
    • Updated build system configuration and packaging metadata for improved project compliance and tool compatibility.

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)
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 6, 2026

📝 Walkthrough

Walkthrough

Updates project packaging metadata in pyproject.toml by reformatting license declaration and raising minimum build-system tool versions (setuptools and setuptools-scm).

Changes

Cohort / File(s) Summary
Build Configuration
pyproject.toml
Updated license metadata from inline table format to plain string, added explicit license file inclusion via license-files = ["LICENSE"], and increased setuptools minimum version from 64 to 77.0.3 and adjusted setuptools-scm requirement.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: adopting PEP 639 license metadata format in the pyproject.toml file, which is the primary objective of the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

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

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c652952d-c2f9-4e8e-8fdb-453f172c45b6

📥 Commits

Reviewing files that changed from the base of the PR and between c9d128f and 01db1d7.

📒 Files selected for processing (1)
  • pyproject.toml


[build-system]
requires = ["setuptools>=64", "setuptools-scm>=8"]
requires = ["setuptools>=77.0.3", "setuptools>=77.0.3-scm>=8"]
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 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}")
PY

Repository: 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.

Suggested change
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.

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.

1 participant