adang1345 / delvewheel

Self-contained Python wheels for Windows

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

__init__.py patch fails with /<package>.data/purelib/ wheel format

nirvana-msu opened this issue · comments

Firstly, thank you! This is immensely useful and it fills in important gap in Python packaging ecosystem!

I've tried this to patch ray-1.1.0 wheels - and it mostly works, aside from the fact that it fails to patch __init__.py (to add the code loading DLLs):

$ ./venv/Scripts/delvewheel repair ray-1.1.0-cp38-cp38-win_amd64.whl
repairing ray-1.1.0-cp38-cp38-win_amd64.whl
finding DLL dependencies
copying DLLs into ray.libs
mangling DLL names
calculating DLL load order
updating ray-1.1.0.dist-info\RECORD
repackaging wheel
fixed wheel written to D:\dev\ray\wheelhouse\ray-1.1.0-cp38-cp38-win_amd64.whl

This is apparently because the script skips /<package>.data/ directory:

item != f'{distribution_name}-{version}.data' and \

Ray stores its package under \ray-1.1.0.data\purelib\ray\, which I believe is a valid way to define the wheel.