[Distutils] Trouble packaging data files.

Yarden Katz yarden at umd.edu
Sat Jan 15 19:52:12 CET 2005


Hi.  I'm trying to distribute a piece of software and I'm able to get
distutils to package all of my *.py modules, which are in a single
package, correctly.  However, I've been unable to get it to package
any of the data files.  I wrote the following setup.py file:

setup(name='pychinko',
      version='0.1',
      ...
      packages=['pychinko'],
      data_files = [('ruletests/rules', ['ruletests/rules/spoRules.n3'])],
      package_dir = {'pychinko': '.'},
      package_data = {'pychinko': ['ruletests/rules/spoRules.n3']})

  But both data_files and package_data lines (and some variations on
  them) are ignored when I run "python setup.py sdist".  The pychinko package is
  included correctly, but none of the data files are.  When it's
  packaged I get something like:
  
creating pychinko-0.1
making hard links in pychinko-0.1...
hard linking setup.py -> pychinko-0.1
hard linking ./__init__.py -> pychinko-0.1/.
hard linking ./afon.py -> pychinko-0.1/.
hard linking ./builtins.py -> pychinko-0.1/.
hard linking ./config.py -> pychinko-0.1/.
...

  But again, no data files at all.  Any idea what could be doing this?
  My dir structure looks something like this:

  pychinko/
    setup.py
    foo.py
    bar.py
    ...
    ruletests/
      rules/
      ...

Thanks a lot, appreciate your help,
-- 
Yarden Katz <yarden at umd.edu>  |  Mind the gap



More information about the Distutils-SIG mailing list