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-wheel do nothing on wheel #15

Closed
guyskk opened this issue Feb 22, 2017 · 2 comments
Closed

delocate-wheel do nothing on wheel #15

guyskk opened this issue Feb 22, 2017 · 2 comments

Comments

@guyskk
Copy link

guyskk commented Feb 22, 2017

I'm building macosx wheels for lightpipes, the source code is:
https://github.com/guyskk/lightpipes/tree/wheels_for_macos

lightpipes need fftw, I install fftw by brew install fftw.
to build the wheel, run pip install numpy then pip wheel --no-deps -w wheelhouse ./lightpipes .
after that, I use delocate to fix the wheel:

➜  lightpipes git:(wheels_for_macos) delocate-listdeps --all  --depending wheelhouse/LightPipes-1.1.0-cp27-cp27m-macosx_10_10_x86_64.whl
/usr/lib/libSystem.B.dylib:
    LightPipes.so
/usr/lib/libc++.1.dylib:
    LightPipes.so
/usr/local/Cellar/fftw/3.3.6-pl1/lib/libfftw3.3.dylib:
    LightPipes.so
➜  lightpipes git:(wheels_for_macos) delocate-wheel -w wheelhouse_fixed -v wheelhouse/LightPipes-1.1.0-cp27-cp27m-macosx_10_10_x86_64.whl
Fixing: wheelhouse/LightPipes-1.1.0-cp27-cp27m-macosx_10_10_x86_64.whl

but it do nothing on the wheel:

➜  lightpipes git:(wheels_for_macos) ls wheelhouse_fixed
LightPipes-1.1.0-cp27-cp27m-macosx_10_10_x86_64.whl
➜  lightpipes git:(wheels_for_macos) ls -lh wheelhouse_fixed
total 176
-rw-r--r--  1 xiachufang  staff    86K  2 22 17:53 LightPipes-1.1.0-cp27-cp27m-macosx_10_10_x86_64.whl
➜  lightpipes git:(wheels_for_macos) ls -lh wheelhouse
total 176
-rw-r--r--  1 xiachufang  staff    86K  2 22 17:53 LightPipes-1.1.0-cp27-cp27m-macosx_10_10_x86_64.whl
@matthew-brett
Copy link
Owner

I think the problem is that your package has a single module at the top level (that goes in the site-packages directory, and delocate doesn't deal with this case - see #12 (comment)

To get delocate to work, you could reorganize your package like this:

setup.py
lightpipes/
    __init__.py
    LightPipes.pyx
    etc

where __init__.py does from .LightPipes import *. Actually that is the general pattern for Python packages, so might be good to do independent of delocate.

@guyskk
Copy link
Author

guyskk commented Feb 28, 2017

This method works, thank you very much!

@guyskk guyskk closed this as completed Feb 28, 2017
matthew-brett added a commit that referenced this issue Apr 15, 2020
MRG: Document limitation with top-level Py module structure

As discussed in Issue #12, Issue #15, and elsewhere
delocate-wheel may ignore compiled extensions at the
top level of a wheel that are not part of a Python
package. This documents that limitation and shows
how the package structure can be adjuste to fix it.
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