Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ authors = [
{name = "Z. Zhouyin", email = "zhouyinzhanghao@gmail.com"}
]
readme = "README.md"
license = {text = "MIT"}
license = "MIT"
license-files = ["LICENSE"]
requires-python = ">=3.9,<3.13"
dependencies = [
"numpy",
Expand Down Expand Up @@ -42,7 +43,7 @@ dftio = "dftio.__main__:main"
Repository = "https://github.com/deepmodeling/dftio"

[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.

build-backend = "setuptools.build_meta"

[tool.setuptools_scm]
Expand Down