pyocd / cmsis-pack-manager

A Rust and Python module for handling CMSIS Pack files
Apache License 2.0
25 stars 33 forks source link

0.5.3: Unable to install wheel #218

Closed dvzrv closed 2 months ago

dvzrv commented 7 months ago

Hi! :wave: When building 0.5.3 for Arch Linux I ran into issues: I am not able to install the resulting wheel using installer, because the resulting entry_points.txt is broken.

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/lib/python3.11/site-packages/installer/__main__.py", line 98, in <module>
    _main(sys.argv[1:], "python -m installer")
  File "/usr/lib/python3.11/site-packages/installer/__main__.py", line 94, in _main
    installer.install(source, destination, {})
  File "/usr/lib/python3.11/site-packages/installer/_core.py", line 86, in install
    for name, module, attr, section in parse_entrypoints(entrypoints_text):
  File "/usr/lib/python3.11/site-packages/installer/utils.py", line 235, in parse_entrypoints
    assert match
AssertionError

Contents of entry_points.txt in the wheel

[console_scripts]
pack-manager=cmsis_pack_manager.pack_manager:main
Documentation=https://github.com/pyocd/cmsis-pack-manager/
Bug Tracker=https://github.com/pyocd/cmsis-pack-manager/issues
Discussions=https://github.com/pyocd/cmsis-pack-manager/discussions
Changelog=https://github.com/pyocd/cmsis-pack-manager/releases

I am building this project with maturin 1.3.2. The above looks like the [project.urls] are leaking into the [project.scripts].

Somewhat related: Why is there a setup.cfg in this repository?

dvzrv commented 7 months ago

It appears that maturin or build were not happy about me just removing the (outdated) maturin build requirement. When replacing it with one that has the current version bound, everything seems to work out fine though. I have created a PR to fix this (and remove the obsolete setup.cfg).