How do I list the files inside a python wheel?

前端 未结 4 1234
春和景丽
春和景丽 2020-12-14 05:53

I\'m poking around the various options to setup.py for including non-python files, and they\'re somewhat less than intuitive. I\'d like to be able to check the

4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-14 06:08

    One could use Python's own zipfile module and CLI to list the files in a wheel (or any other zip file):

    python -m zipfile --list path/to/my-wheel-file.whl
    

    Or to extract:

    python -m zipfile --extract path/to/my-wheel-file.whl path/to/output/directory
    

提交回复
热议问题