diff --git a/build-backend/pex_build/hatchling/metadata_hook.py b/build-backend/pex_build/hatchling/metadata_hook.py index 196f9d4d4..aec544ebe 100644 --- a/build-backend/pex_build/hatchling/metadata_hook.py +++ b/build-backend/pex_build/hatchling/metadata_hook.py @@ -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: diff --git a/pyproject.toml b/pyproject.toml index 067643519..64b0aba5c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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"} @@ -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"} ] @@ -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[^"]+)"'