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.delocating.DelocationError: wheel/PIL/.dylibs/libwebp.7.dylib already exists #65

Closed
hugovk opened this issue Dec 20, 2019 · 5 comments

Comments

@hugovk
Copy link

hugovk commented Dec 20, 2019

This has started happening for Python 3.8 on macOS since Travis changed from a 10.13.3 image to a 10.13.6 image:

Building wheels for collected packages: delocate
  Building wheel for delocate (setup.py): started
  Building wheel for delocate (setup.py): finished with status 'done'
  Created wheel for delocate: filename=delocate-0.8.0-cp38-none-any.whl size=101856 sha256=a8ed72c8c953b730b87150979092ef15f37998dbc7f66a384f2e874e3de21fb8
  Stored in directory: /Users/travis/Library/Caches/pip/wheels/a7/ec/01/fff106a59b5697042f1ff32814f1f112e3eee5a2c5239d7735
Successfully built delocate
Installing collected packages: delocate
Successfully installed delocate-0.8.0
Traceback (most recent call last):
  File "/Users/travis/build/python-pillow/pillow-wheels/venv/bin/delocate-wheel", line 8, in <module>
    sys.exit(main())
  File "/Users/travis/build/python-pillow/pillow-wheels/venv/lib/python3.8/site-packages/delocate/cmd/delocate_wheel.py", line 68, in main
    copied = delocate_wheel(wheel, out_wheel, lib_filt_func=lib_filt_func,
  File "/Users/travis/build/python-pillow/pillow-wheels/venv/lib/python3.8/site-packages/delocate/delocating.py", line 376, in delocate_wheel
    copied_libs = delocate_path(package_path, lib_path,
  File "/Users/travis/build/python-pillow/pillow-wheels/venv/lib/python3.8/site-packages/delocate/delocating.py", line 289, in delocate_path
    return copy_recurse(lib_path, copy_filt_func, copied)
  File "/Users/travis/build/python-pillow/pillow-wheels/venv/lib/python3.8/site-packages/delocate/delocating.py", line 145, in copy_recurse
    _copy_required(lib_path, copy_filt_func, copied_libs)
  File "/Users/travis/build/python-pillow/pillow-wheels/venv/lib/python3.8/site-packages/delocate/delocating.py", line 230, in _copy_required
    raise DelocationError(out_path + ' already exists')
delocate.delocating.DelocationError: /private/var/folders/nz/vv4_9tw56nv9k3tkvyszvwg80000gn/T/tmpyrhzp83g/wheel/PIL/.dylibs/libwebp.7.dylib already exists

Failing build:

Earlier passing build:

(Also reported here: python-pillow/pillow-wheels#133)

@matthew-brett
Copy link
Owner

Would you mind adding a line delocate-listdeps Pillow-6.2.1-cp38-cp38-macosx_10_9_x86_64.whl in your config, to see where the libraries come from?

@hugovk
Copy link
Author

hugovk commented Dec 20, 2019

@matthew-brett
Copy link
Owner

Aha - yes - it's not very straightforward. I think you can add this to config.sh:

function repair_wheelhouse {
    local wheelhouse=$1
    install_delocate
    delocate-listdeps $wheelhouse/*.whl
    delocate-wheel $wheelhouse/*.whl # copies library dependencies into wheel
}

@hugovk
Copy link
Author

hugovk commented Dec 20, 2019

Thanks, with that, I get:

Installing collected packages: delocate
Successfully installed delocate-0.8.0
/usr/local/lib/libfreetype.6.dylib
/usr/local/lib/libjpeg.9.dylib
/usr/local/lib/liblcms2.2.dylib
/usr/local/lib/libopenjp2.2.3.1.dylib
/usr/local/lib/libtiff.5.dylib
/usr/local/lib/libwebp.7.dylib
/usr/local/lib/libwebpdemux.2.dylib
/usr/local/lib/libwebpmux.3.dylib
/usr/local/lib/libz.1.2.11.dylib
Traceback (most recent call last):
  File "/Users/travis/build/hugovk/pillow-wheels/venv/bin/delocate-wheel", line 8, in <module>
    sys.exit(main())
  File "/Users/travis/build/hugovk/pillow-wheels/venv/lib/python3.8/site-packages/delocate/cmd/delocate_wheel.py", line 68, in main
    copied = delocate_wheel(wheel, out_wheel, lib_filt_func=lib_filt_func,
  File "/Users/travis/build/hugovk/pillow-wheels/venv/lib/python3.8/site-packages/delocate/delocating.py", line 376, in delocate_wheel
    copied_libs = delocate_path(package_path, lib_path,
  File "/Users/travis/build/hugovk/pillow-wheels/venv/lib/python3.8/site-packages/delocate/delocating.py", line 289, in delocate_path
    return copy_recurse(lib_path, copy_filt_func, copied)
  File "/Users/travis/build/hugovk/pillow-wheels/venv/lib/python3.8/site-packages/delocate/delocating.py", line 145, in copy_recurse
    _copy_required(lib_path, copy_filt_func, copied_libs)
  File "/Users/travis/build/hugovk/pillow-wheels/venv/lib/python3.8/site-packages/delocate/delocating.py", line 230, in _copy_required
    raise DelocationError(out_path + ' already exists')
delocate.delocating.DelocationError: /private/var/folders/nz/vv4_9tw56nv9k3tkvyszvwg80000gn/T/tmp716igctx/wheel/PIL/.dylibs/libwebp.7.dylib already exists

https://travis-ci.org/hugovk/pillow-wheels/jobs/627857852#L4055

@hugovk
Copy link
Author

hugovk commented Dec 27, 2019

This has been fixed by @radarhere in python-pillow/pillow-wheels#134 by switching the osx_image.

Thanks both!

@hugovk hugovk closed this as completed Dec 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants