I have a directory structure similar to the following:
├── myproj
│   ├── utils.py
│   ├── __init__.py
│   ├── routes
│   │   ├── __init__.py
│   │   ├── auth.py
│   │   └── stuff.py
├── html
│   ├── index.html
│   └── about.html
├── MANIFEST.in
├── setup.cfg 
└── setup.py
The contents of MANIFEST.in are:
graft html
The following post alludes to being able to use MANIFEST.in with PEX (Python PEX: Pack a package with its sub-packages) but when I run either pex . -o myproject or python setup.py bdist_pex the html/ directory is not included, verified via unzip -Z1 myproject on the resulting output, but it is included when running python setup.py sdist.
How do I include these extra html files when building a PEX binary?
                        
Defining a
MANIFEST.inalone isn't enough. You also need to set theinclude_package_dataoption toTrueinsetup.cfg.This option will include extra files found in the package so you must also move the
htmldirectory inside themyprojpackage.So the directory structure looks like:
The contents of MANIFEST.in are:
And setup.cfg contains in the
[options]section: