Search code examples
pythonpython-3.xdockeryamlpython-wheel

does python wheel remove yml files?


This is part of my docker file:

RUN python setup.py sdist bdist_wheel
RUN find dist -maxdepth 1 -mindepth 1 -name '*.tar.gz' -print0 | xargs -0 -I {} mv {} athena.tar.gz

FROM python:3.7.4-slim

after I build my docker file. I run my container bash and type

find . -type f -name "*.yml"

the result is empty.

I have lots of yml files in my project. My code run correctly out of container but in docker I get errors which say couldn't find my yml files.

Does wheel remove yml files?(maybe does it think they are useless?)


Solution

  • Wheels won't generally include anything but Python files unless you've specified a manifest.

    You can see this answer for more details, but the tl;dr is that a MANIFEST.in file next to your setup.py with

    recursive-include *.yml
    

    should include all YAML files.