Data files with distutils and special paths

Pablo Recio Quijano rikutheronin at gmail.com
Wed Oct 20 17:48:51 EDT 2010


Hi!

I was following the documentation about distutils [1] in order to install my
application in a python-way. But installing it in /usr/local (following the
official doc [2] too) with

$ sudo python setup.py install --prefix=/usr/local

The data files are created inside the python package, in
/usr/local/lib/python2.6/dist-packages... The structure is very similar at
the given in [1]:

setup.py
foo/__init.py__
foo(gui.py
foo/core.py
foo/data/gui/main.glade
foo/data/images/logo.png

And the setup.py:

from setuptools import setup

files = ['data/gui/*.glade', 'data/icons/*.png']

setup(name='foo',
      version='1.0',
      author='John Doe',
      author_email='john.doe at example.com',
      packages=['foo'],
      dpackage_dir={'foo': 'foo'},
      package_data={'foo': files}, )

What I'm missing?

Regards,

[1]
http://docs.python.org/distutils/setupscript.html#installing-package-data
[2]
http://docs.python.org/install/#alternate-installation-unix-the-prefix-scheme

-- 
Pablo Recio Quijano

Desarrollador Django
Yaco Sistemas - http://www.yaco.es/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20101020/b8b68926/attachment.html>


More information about the Python-list mailing list