adang1345 / delvewheel

Self-contained Python wheels for Windows

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

delvewheel needed fails with PEFormatError

swt2c opened this issue · comments

Running needed reports a PEFormatError:

(env) C:\Users\Scott Talbert\pycurl>delvewheel needed dist/pycurl-7.44.1-cp38-cp38-win_amd64.whl
Traceback (most recent call last):
  File "C:\Program Files\Python38\lib\runpy.py", line 194, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Program Files\Python38\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\Scott Talbert\pycurl\env\Scripts\delvewheel.exe\__main__.py", line 7, in <module>
  File "c:\users\scott talbert\pycurl\env\lib\site-packages\delvewheel\__main__.py", line 72, in main
    for dll_name in patch_dll.get_direct_needed(args.file):
  File "c:\users\scott talbert\pycurl\env\lib\site-packages\delvewheel\patch_dll.py", line 78, in get_direct_needed
    with PEContext(lib_path) as pe:
  File "c:\users\scott talbert\pycurl\env\lib\site-packages\delvewheel\patch_dll.py", line 17, in __init__
    self._pe = pefile.PE(name)
  File "c:\users\scott talbert\pycurl\env\lib\site-packages\pefile.py", line 2743, in __init__
    self.__parse__(name, data, fast_load)
  File "c:\users\scott talbert\pycurl\env\lib\site-packages\pefile.py", line 2851, in __parse__
    raise PEFormatError("DOS Header magic not found.")
pefile.PEFormatError: 'DOS Header magic not found.'

Wheel:
pycurl-7.44.1-cp38-cp38-win_amd64.zip

delvewheel needed is meant to be used with a single executable file (DLL or PYD), not a wheel file. I edited the help documentation to clarify this.