3

I have this in my MANIFEST.in

recursive-include tables *.csv

and I can see the folder included in the created .tar.gz

/mypackage-0.0.1
    /mypackage
    /mypackage.egg-info
    /tables

but I can't find my folder once I install the package with:

pip install mypackage-0.0.1.tar.gz

or

easy_install mypackage-0.0.1.tar.gz

Any clue?

neurino
  • 11,500
  • 2
  • 40
  • 63

1 Answers1

3

With MANIFEST.in, you specify the files to embedd in the archive, not the way they will be installed.

To tell python/distutils where you want to install your files, add in your setup.py fill the parameter data_files in the setup() method. This way, you will be able to specify where to install those additional files.

Cédric Julien
  • 78,516
  • 15
  • 127
  • 132
  • The bad part with `data_files` is they are installed under `sys.prefix` (usually `/usr`). This can give big troubles if you want to include a folder with a common name, say `share`. I found that moving `tables` under inner `mypackage` to be more consistent and error proof than all I had to do is add files to `MANIFEST.in` (say `tables` files are csv files I just added `*.csv` after `recursive-include mypackage *.txt ...` – neurino Sep 14 '11 at 12:11