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
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ name = "dptb"
dynamic = ["version"]
description = "A unified deep learning package for electronic structure models including tight-binding, KS Hamiltonian and density matrix models"
readme = "README.md"
license = {text = "LGPL-3.0"}
license = "LGPL-3.0-or-later"
license-files = ["LICENSE"]
requires-python = ">=3.9,<=3.12.9"
authors = [
{name = "DeePTB Team"}
Expand All @@ -12,7 +13,6 @@ keywords = ["deep learning", "tight-binding", "electronic structure", "physics"]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
Expand Down Expand Up @@ -60,7 +60,7 @@ Repository = "https://github.com/deepmodeling/DeePTB"
Documentation = "https://deeptb.readthedocs.io"

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

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
# Verify [build-system].requires entries are syntactically sane and not conflated.
python - <<'PY'
import tomllib, re, sys
with open("pyproject.toml", "rb") as f:
    data = tomllib.load(f)

reqs = data.get("build-system", {}).get("requires", [])
print("build-system.requires =", reqs)

bad = [r for r in reqs if re.search(r"setuptools>=\d+(\.\d+)*-scm", r)]
if bad:
    print("INVALID combined requirement(s):", bad)
    sys.exit(1)

expected = {"setuptools>=77.0.3", "setuptools-scm>=8"}
missing = expected - set(reqs)
if missing:
    print("Missing expected requirement(s):", sorted(missing))
    sys.exit(2)

print("Requirements look correctly split.")
PY

Repository: deepmodeling/DeePTB

Length of output: 201


Fix malformed build requirement on Line 64.

"setuptools>=77.0.3-scm>=8" is invalid—it conflates two separate package requirements into one non-compliant string, causing TOML/packaging schema parse failures that block metadata generation and installation.

🔧 Proposed fix
requires = ["setuptools>=77.0.3", "setuptools>=77.0.3-scm>=8"]
requires = ["setuptools>=77.0.3", "setuptools-scm>=8"]

Split into two proper PEP 508 requirement strings: setuptools>=77.0.3 and 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"]
🧰 Tools
🪛 GitHub Actions: DeePTB tests.

[error] 64-64: uv failed to generate package metadata for dptb @ editable+ because pyproject.toml does not match the required schema. TOML parse error at line 64, column 35: invalid version string in requires = ["setuptools>=77.0.3", "setuptools>=77.0.3-scm>=8"] (after parsing 77.0.3, found -scm>=8 which is not part of a valid version).

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@pyproject.toml` at line 64, The requires entry in pyproject.toml currently
has a malformed requirement string ("setuptools>=77.0.3-scm>=8"); update the
requires list so it contains two valid PEP 508 requirement strings instead of
the concatenated one — replace the single "setuptools>=77.0.3-scm>=8" item with
"setuptools>=77.0.3" and "setuptools-scm>=8" in the requires array to fix
metadata parsing and installation.

build-backend = "setuptools.build_meta"

[tool.setuptools.packages.find]
Expand Down
Loading