Skip to content

Commit

Permalink
fix: don't force description and version field
Browse files Browse the repository at this point in the history
  • Loading branch information
frostming committed Dec 1, 2022
1 parent 4729bd1 commit 85b8199
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
13 changes: 7 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
name = "pdm-backend"
description = "The build backend used by PDM that supports latest packaging standards"
authors = [
{name = "Frost Ming", email = "mianghong@gmail.com"}
{ name = "Frost Ming", email = "me@frostming.com" }
]
license = {text = "MIT"}
requires-python = ">=3.7"
Expand All @@ -28,12 +28,13 @@ dependencies = [
]

[project.urls]
homepage = "https://pdm.fming.dev"
repository = "https://github.com/pdm-project/pdm-backend"
Homepage = "https://github.com/pdm-project/pdm-backend"
Repository = "https://github.com/pdm-project/pdm-backend"
Documentation = "https://pdm-backend.fming.dev"

[project.optional-dependencies]
[tool.pdm]
version = {source = "file", path = "src/pdm/backend/__init__.py"}
[tool.pdm.version]
source = "file"
path = "src/pdm/backend/__init__.py"

[tool.pdm.build]
includes = ["src"]
Expand Down
4 changes: 2 additions & 2 deletions src/pdm/backend/hooks/setuptools.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,8 +126,8 @@ def format_setup_py(self, context: Context) -> str:
meta = context.config.metadata
kwargs = {
"name": meta["name"],
"version": meta["version"],
"description": meta["description"],
"version": meta.get("version", "0.0.0"),
"description": meta.get("description", "UNKNOWN"),
"url": (meta.get("project-urls", {})).get("homepage", ""),
}

Expand Down

0 comments on commit 85b8199

Please sign in to comment.