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

Nothing happen on delocate-wheel #63

Closed
yutkin opened this issue Dec 15, 2019 · 4 comments · Fixed by #123
Closed

Nothing happen on delocate-wheel #63

yutkin opened this issue Dec 15, 2019 · 4 comments · Fixed by #123
Labels

Comments

@yutkin
Copy link

yutkin commented Dec 15, 2019

Log:

(venv) ➜  opus-playgroud git:(master) ✗ pip wheel .
Processing /Users/d.yutkin/dev/opus-playgroud
Building wheels for collected packages: jopus
  Building wheel for jopus (setup.py) ... done
  Created wheel for jopus: filename=jopus-0.0.1-cp37-cp37m-macosx_10_15_x86_64.whl size=40195 sha256=2174e6d8c057d230e00a3332bc6bd6e37162bc22fafae25cbb33760dc531bd4e
  Stored in directory: /Users/d.yutkin/dev/opus-playgroud
Successfully built jopus
(venv) ➜  opus-playgroud git:(master) ✗ delocate-listdeps  jopus-0.0.1-cp37-cp37m-macosx_10_15_x86_64.whl
/usr/local/Cellar/libogg/1.3.4/lib/libogg.0.dylib
/usr/local/Cellar/opus/1.3.1/lib/libopus.0.dylib
/usr/local/Cellar/opusfile/0.11_1/lib/libopusfile.0.dylib
/usr/local/Cellar/opusfile/0.11_1/lib/libopusurl.0.dylib
(venv) ➜  opus-playgroud git:(master) ✗ delocate-wheel -v jopus-0.0.1-cp37-cp37m-macosx_10_15_x86_64.whl
Fixing: jopus-0.0.1-cp37-cp37m-macosx_10_15_x86_64.whl
(venv) ➜  opus-playgroud git:(master) ✗ delocate-listdeps  jopus-0.0.1-cp37-cp37m-macosx_10_15_x86_64.whl
/usr/local/Cellar/libogg/1.3.4/lib/libogg.0.dylib
/usr/local/Cellar/opus/1.3.1/lib/libopus.0.dylib
/usr/local/Cellar/opusfile/0.11_1/lib/libopusfile.0.dylib
/usr/local/Cellar/opusfile/0.11_1/lib/libopusurl.0.dylib
(venv) ➜  opus-playgroud git:(master) ✗

jopus-0.0.1-cp37-cp37m-macosx_10_15_x86_64.whl.zip (just remove .zip extension)

@chatziko
Copy link

Same problem here. I thought I broke something in my setup, but seeing this issue it's likely not a coincidence.

@chatziko
Copy link

It was a coincidence.

I just realized that delocate-wheel does not work then the .so files are in the top level (#15, #22), which is a pity.

@yutkin
Copy link
Author

yutkin commented Dec 17, 2019

I moved sources at the top level like this:

├── jopus
│   ├── __init__.py
│   ├── jopus.cpp
│   ├── jopus.h
│   ├── jopus.pyx
│   └── jopus_decl.pxd
├── setup.py

__init__.py:

from _jopus_cython import open_url, open_file, OpusAudio

but it does not work:

(venv) ➜  opus-playgroud git:(master) ✗ pip wheel . --no-deps
Processing /Users/d.yutkin/dev/opus-playgroud
Building wheels for collected packages: jopus
  Building wheel for jopus (setup.py) ... done
  Created wheel for jopus: filename=jopus-0.0.1-cp37-cp37m-macosx_10_15_x86_64.whl size=94999 sha256=d4d9ca0c1720af1384819399edd9b8906bfe8c3bf8ab6052487c77b96ff8445a
  Stored in directory: /Users/d.yutkin/dev/opus-playgroud
Successfully built jopus

(venv) ➜  opus-playgroud git:(master) ✗ delocate-listdeps --all jopus-0.0.1-cp37-cp37m-macosx_10_15_x86_64.whl
/usr/lib/libSystem.B.dylib
/usr/lib/libc++.1.dylib
/usr/local/Cellar/libogg/1.3.4/lib/libogg.0.dylib
/usr/local/Cellar/opus/1.3.1/lib/libopus.0.dylib
/usr/local/Cellar/opusfile/0.11_1/lib/libopusfile.0.dylib
/usr/local/Cellar/opusfile/0.11_1/lib/libopusurl.0.dylib

(venv) ➜  opus-playgroud git:(master) ✗ delocate-wheel -v jopus-0.0.1-cp37-cp37m-macosx_10_15_x86_64.whl
Fixing: jopus-0.0.1-cp37-cp37m-macosx_10_15_x86_64.whl

(venv) ➜  opus-playgroud git:(master) ✗ delocate-listdeps --all jopus-0.0.1-cp37-cp37m-macosx_10_15_x86_64.whl
/usr/lib/libSystem.B.dylib
/usr/lib/libc++.1.dylib
/usr/local/Cellar/libogg/1.3.4/lib/libogg.0.dylib
/usr/local/Cellar/opus/1.3.1/lib/libopus.0.dylib
/usr/local/Cellar/opusfile/0.11_1/lib/libopusfile.0.dylib
/usr/local/Cellar/opusfile/0.11_1/lib/libopusurl.0.dylib

Commit yutkin/jopus@67e19df

@McSinyx
Copy link

McSinyx commented May 1, 2020

Having the same problem here, I have the extension module compiled as palace/__init__.*.so (McSinyx/palace@a672ec5), still delocate-wheel does nothing.

@HexDecimal HexDecimal added the bug label Sep 19, 2021
matthew-brett added a commit that referenced this issue Sep 21, 2021
MRG: Allow for delocating top level modules.

This delocates libraries into one directory per wheel.  I've added a top-level package-less wheel to test with.

Prevents copying duplicate libraries when a wheel has multiple packages.  Fixes #35.

Fixes issues where the module to work on is at the top-level, such as a wheel with no packages.  Generally any current issue where delocate mysteriously doesn't bundle libraries has been fixed.  Fixes #72, fixes #22, fixes #45, fixes #63, fixes #121, fixes #66, fixes #49, fixes #67.

See `_decide_dylib_bundle_directory` for how the folder to use is determined.  I've followed the advice from #72 to use an auditwheel-style name.  Wheels without packages use the folder `{package_name}.dylibs`, wheels with packages will put a `.dylibs` folder in only one of the packages preferring the one that matches the wheel name.  The one directory will hold the dependencies of the entire wheel.

After that the fix was simple:  In `delocate_wheel` call `delocate_path` only once and call it with a `tree_path` that includes the entire wheel.

Since this always collects everything regardless of if a package is found or not.  This will also resolve issues where namespace packages couldn't be delocated.  Fixes #95.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants