Python Packaging: Data files are put properly in tar.gz file but are not installed to virtual environment

前端 未结 5 1529
野趣味
野趣味 2020-12-07 20:24

I can\'t properly install the project package_fiddler to my virtual environment.

I have figured out that MANIFEST.in is responsib

5条回答
  •  春和景丽
    2020-12-07 20:56

    I personally dislike the way setuptools mixes code and data both conceptually and implementation-wise. I think that it's that implementation that is tripping you up here. For setuptools to find and use package_data it needs for the data to reside inside of a python package. A python package can be a directory but there needs to be a __init__.py file in the directory. So it looks like you need the following (empty is fine) files:

    ./package_fiddler/data/__init__.py
    ./package_fiddler/data/stylesheets/__init__.py
    

提交回复
热议问题