How do you add additional files to a wheel?

前端 未结 6 606
北荒
北荒 2020-11-28 21:58

How do control what files are included in a wheel? It appears MANIFEST.in isn\'t used by python setup.py bdist_wheel.

UPDATE

6条回答
  •  悲哀的现实
    2020-11-28 22:09

    I had config/ directory with JSON files in it, which I needed to add to the wheel package. So, I've added these lines to MANIFEST.in:

    recursive-include config/ *.json
    

    The following directive to setup.py:

    setup(
     ...
     include_package_data=True,
    )
    

    And nothing worked. Until I've created an empty file called __init__.py inside config/ directory.

    (Python 3.6.7, wheel 3.6.7, setuptools 39.0.1)

提交回复
热议问题