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

[delocate-addplat] parse_wheel_filename may return wrong package name #175

Open
duburcqa opened this issue Jan 26, 2023 · 2 comments
Open
Labels

Comments

@duburcqa
Copy link

duburcqa commented Jan 26, 2023

Describe the bug

The parse_wheel_filename method that is involved in the CLI command delocate-addplat returns the "canonical" package name as first output argument, i.e. underscores are replaced by dashes if any. This name is then used to defined where to find the dist-info. However, the name that is actually used to prepend dist-info is actually doing the contrary (using dashes in place of underscores), leading to failure.

To Reproduce

Here is an example of such a failure:

adding 'jiminy_py/viewer/panda3d/panda3d_widget.py'
adding 'jiminy_py-1.7.14.data/data/cmake/jiminyConfig.cmake'
adding 'jiminy_py-1.7.14.data/data/cmake/jiminyConfigVersion.cmake'
adding 'jiminy_py-1.7.14.dist-info/METADATA'
adding 'jiminy_py-1.7.14.dist-info/WHEEL'
adding 'jiminy_py-1.7.14.dist-info/entry_points.txt'
adding 'jiminy_py-1.7.14.dist-info/top_level.txt'
adding 'jiminy_py-1.7.14.dist-info/RECORD'
removing build/bdist.macosx-10.15-x86_64/wheel

[...]

Fixing: /Users/runner/work/jiminy/jiminy/build/pypi/dist/jiminy_py/jiminy_py-1.7.14-cp38-cp38-macosx_10_15_x86_64.whl
Copied to package .dylibs directory:
  /Users/runner/work/jiminy/jiminy/install/lib/libboost_numpy38.dylib
  /Users/runner/work/jiminy/jiminy/install/lib/libboost_python38.dylib
  /Users/runner/work/jiminy/jiminy/install/lib/libeigenpy.dylib
  /Users/runner/work/jiminy/jiminy/install/lib/libhpp-fcl.dylib
  /Users/runner/work/jiminy/jiminy/install/lib/libpinocchio.2.6.7.dylib

[...]

Setting platform tags macosx_10_14_universal2 for wheel /Users/runner/work/jiminy/jiminy/build/wheelhouse/jiminy_py-1.7.14-cp38-cp38-macosx_10_15_x86_64.whl
Traceback (most recent call last):
  File "/Users/runner/hostedtoolcache/Python/3.8.16/x64/bin/delocate-addplat", line 8, in <module>
    sys.exit(main())
  File "/Users/runner/hostedtoolcache/Python/3.8.16/x64/lib/python3.8/site-packages/delocate/cmd/delocate_addplat.py", line 147, in main
    fname = add_platforms(
  File "/Users/runner/hostedtoolcache/Python/3.8.16/x64/lib/python3.8/site-packages/delocate/wheeltools.py", line 230, in add_platforms
    info = read_pkg_info(info_fname)
  File "/Users/runner/hostedtoolcache/Python/3.8.16/x64/lib/python3.8/site-packages/delocate/pkginfo.py", line 22, in read_pkg_info
    with open(path, encoding="utf-8") as headers:
FileNotFoundError: [Errno 2] No such file or directory: 'jiminy-py-1.7.14.dist-info/WHEEL'

The complete log file is available here.

Expected behavior

The package names used to create and search dist-info should be consistent.

Wheels used

Could be added if necessary

Platform (please complete the following information):

  • OS version: macOS 10.9
  • Delocate version: 0.10.4

Additional context

It was working just find before this MR #141

@duburcqa duburcqa added the bug label Jan 26, 2023
@duburcqa duburcqa changed the title [delocate-addplat] parse_wheel_filename wrong if package name contains dash [delocate-addplat] parse_wheel_filename may return wrong package name Jan 26, 2023
@dvarrazzo
Copy link

@dvarrazzo
Copy link

FYI, we solved the problem by using cibuildwheel, instead of using delocate from a job we rolled on owr own. So probably the problem was in the options used.

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

No branches or pull requests

2 participants