Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PKG-INFO metadata 2.2 is not supported #483

Open
jychuah opened this issue Jan 9, 2025 · 2 comments
Open

PKG-INFO metadata 2.2 is not supported #483

jychuah opened this issue Jan 9, 2025 · 2 comments

Comments

@jychuah
Copy link

jychuah commented Jan 9, 2025

When repacking a wheel, the following error is raised

  File "edm/tools/repack.py", line 264, in repack_wheel_cmd
  File "edm/tools/repack.py", line 681, in _get_spec
  File "edm/tools/repack.py", line 625, in _get_spec_data
  File "okonomiyaki/file_formats/_package_info.py", line 115, in from_wheel
  File "okonomiyaki/file_formats/_package_info.py", line 165, in from_string
  File "okonomiyaki/file_formats/_package_info.py", line 360, in _ensure_supported_version
okonomiyaki.errors.OkonomiyakiError: Unsupported PKG-INFO metadata format: '2.2'
Unexpected error: OkonomiyakiError("Unsupported PKG-INFO metadata format: '2.2'")

Context

  • This occurred for new builds starting on 2025/01/09 in the edge-product repository
  • We are building a wheel and then repacking to an egg using the following pyproject.toml:
[build-system]
requires = ["setuptools>=64"]
build-backend = "setuptools.build_meta"

[project]
name = "enthought_edge"
license = {text = "Proprietary"}
authors = [
    { name = "Enthought, inc.", email ="[email protected]"} 
]

dynamic = ["version", "dependencies"]

[project.urls]
Homepage = "https://www.enthought.com"
Documentation = "https://docs.enthought.com/edge"
Support = "https://edge-support.enthought.com"

[tool.setuptools]
include-package-data = true

[tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]}
version = {attr = "edge.__version__"}

[tool.setuptools.packages.find]
include = ["edge", "edge.*"]
  • Investigating generation of the PKG-INFO version, it appears that the latest setup tools version 75.8.0 released on 2025/01/08 allows "dynamic" pkg-info metadata version computation, likely causing the version info to be computed to 2.2. Settting "setuptools==75.7.0" resolves the issue.
@itziakos
Copy link
Member

itziakos commented Jan 9, 2025

Yes, the current version of okonomiyaki supports PKG-INFO metadata version upto 2.1. We should add support for PKG-INFO Metadata 2.2

@dpinte
Copy link
Member

dpinte commented Jan 9, 2025

Updating line 2 with requires = ["setuptools>=64, <75.8"] solves the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants