2

I have such a structure

$ tree -h
.
├── [1.0K]  myproj
│   ├── [   0]  index.py
│   ├── [   0]  __init__.py
│   └── [1.0K]  models
│       ├── [   0]  __init__.py
│       ├── [   0]  mymodels.py
│       └── [   0]  othermodels.py
├── [296K]  myproj.pex
└── [ 106]  setup.py

$ cat setup.py
from setuptools import setup, find_packages

setup(
    name='myproj',
    packages=find_packages()
)

I want to pack entire myproj package (including myproj.models sub-package) into a pex file. I run pex . -o myproj.pex but myproj.models is absent from the pex archive:

...
├── [1.0K]  .deps
│   └── [1.0K]  myproj-0.0.0-py2-none-any.whl
│       ├── [1.0K]  myproj
│       │   ├── [   0]  index.py
│       │   └── [   0]  __init__.py
│       └── [1.0K]  myproj-0.0.0.dist-info
...

How can I pack the whole package?

Viacheslav
  • 3,876
  • 2
  • 21
  • 28

1 Answers1

1

A quick n dirty way is to put a MANIFEST.in file in myproj directory that says:

global-include *.py
SU3
  • 5,064
  • 3
  • 35
  • 66
c17r
  • 143
  • 12