How do I list the files inside a python wheel?

前端 未结 4 1210
春和景丽
春和景丽 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:27

    unzip -l dist/*.whl (credit)

    Since a wheel is a ZIP file, unzip works. Tab completion for the file name won't work, unless the extension is renamed to zip. The from zipfile import ZipFile approach assumes only the presence of Python in the system, but a one-liner in the shell is more practical.

提交回复
热议问题