Skip to content
Closed
Show file tree
Hide file tree
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
10 changes: 10 additions & 0 deletions build-backend/pex_build/hatchling/metadata_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ def update(self, metadata):
file=sys.stderr,
)
metadata["requires-python"] = requires_python
else:
metadata["requires-python"] = ">=2.7,<3.13,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*"

metadata["urls"] = {
"Changelog": "https://github.com/pex-tool/pex/blob/v{pex_version}/CHANGES.md",
"Documentation": "https://docs.pex-tool.org/",
"Download": "https://github.com/pex-tool/pex/releases/download/v{pex_version}/pex",
"Homepage": "https://github.com/pex-tool/pex",
"Source": "https://github.com/pex-tool/pex/tree/v{pex_version}",
}

expand = self.config.get("expand")
if expand:
Expand Down
19 changes: 2 additions & 17 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,7 @@
# entry point metadata so the hook is discovered.
backend-path = ["build-backend"]
build-backend = "pex_build.hatchling.build"

# The hatchling 1.22.0 release breaks our build in several ways:
# + Our console scripts are no longer generated.
# + The `project.readme` pyproject.toml key now has its value hydrated before our metadata plugin
# runs, which foils our metadata expansion since our README.rst contains inadvertant expansion
# tokens.
# This pin low buys time to work through the issues.
requires = ["hatchling<1.22.0"]
requires = ["hatchling"]

[tool.hatch.metadata.hooks.pex-adjust-metadata]
expand = {"pex_version" = "version"}
Expand All @@ -22,8 +15,7 @@ expand = {"pex_version" = "version"}

[project]
name = "pex"
dynamic = ["version"]
requires-python = ">=2.7,<3.13,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*"
dynamic = ["version", "requires-python", "urls"]
authors = [
{name = "The PEX developers", email="developers@pex-tool.org"}
]
Expand Down Expand Up @@ -71,13 +63,6 @@ pex-tools = "pex.tools.main:main"
[project.entry-points."distutils.commands"]
bdist_pex = "pex.distutils.commands.bdist_pex:bdist_pex"

[project.urls]
Changelog = "https://github.com/pex-tool/pex/blob/v{pex_version}/CHANGES.md"
Documentation = "https://docs.pex-tool.org/"
Download = "https://github.com/pex-tool/pex/releases/download/v{pex_version}/pex"
Homepage = "https://github.com/pex-tool/pex"
Source = "https://github.com/pex-tool/pex/tree/v{pex_version}"

[tool.hatch.version]
path = "pex/version.py"
pattern = '__version__ = "(?P<version>[^"]+)"'
Expand Down