Comments (5)
Thanks, this is enough information for me to determine what the problem is. The issue is related to the fact that you have a folder and a module with the same name, nucleus
. When you do import nucleus
, Python must choose whether you mean the folder nucleus
or the module nucleus.cp37-win_amd64.pyd
. When the file __init__.py
does not exist in the folder, Python chooses the module, which is what you expect. When __init__.py
exists in the folder, Python chooses the folder, which is causing problems.
The solution would be for delvewheel
to avoid adding the file __init__.py
into a folder if it is next to a module with the same name. I'll get started on implementing this.
from delvewheel.
The purpose of adding __init__.py
is so that the location of the dependent DLLs is added to the DLL search path. Normally, without this file, module imports may fail. I'll need more information to figure out why __init__.py
is causing issues for you.
Did things work for you with an older version of delvewheel
? If so, was __init__.py
added with this older version and do you remember what the older version of delvewheel
was?
Can I see the wheel where this issue is happening? You can provide a GitHub link if the wheel is stored on GitHub, or you can upload the file in a comment. Also, if an older version of delvewheel
worked for you, can I see the functional wheel that was created by the older version?
from delvewheel.
Sorry for responding this late. I'm afraid I can't share our wheels publicly. I can only show the file structure inside the wheel:
Inside the "nucleus" subfolder ("hardware" and "ml-models" contain config data used by the application):
We started using delvewheel in February 2021 and we probably used that initial version until my upgrade in October. We had no problems with the older version. It did not add the __init.py__
file. Hence the quick fix with the latest version is simply to remove that file from the "nucleus" subfolder.
I am not leaving you with much to work on, I'm afraid. But it would be great to avoid the manual removal from the wheels.
from delvewheel.
Thanks! That makes a lot of sense. I really look forward to a solution for this
from delvewheel.
Thanks a lot for doing this! Your fix did the trick
from delvewheel.
Related Issues (20)
- Make import symbol limit configurable HOT 2
- Use pefile.PE(..., fast_load=True) where possible
- Anaconda and `os.add_dll_directory` HOT 2
- Un-deprecate --no-mangle-all
- "--add-dll"-specified dlls are not added to the .load-order file HOT 2
- Improve messaging about 'strip' HOT 6
- Suppress delay-load? HOT 1
- DELVEWHEEL file makes reproducibility difficult HOT 4
- Don't call add_dll_directory unless directory exists HOT 2
- Feature Request: Add an option to allow the user to specify which `__init__.py` gets the patch HOT 2
- delvewheel 1.5.1 broken for Python 3.7 HOT 3
- Install on Windows 11 HOT 2
- Support `SOURCE_DATE_EPOCH` environment variable for reproducibility
- Patching __init__.py fails when module docstring is in double quotes
- Ignoring .pyd files in data/ directory HOT 1
- unable to find msvcp140.dll when cross-compiling to ARM64 with cibuildwheel HOT 2
- Include *.lib files, if available
- Docs: Provide additional resources / information about mangling HOT 1
- Option to patch all dlls in wheel ? HOT 2
- Missing dependency: wheel HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from delvewheel.