[Distutils] package_data issue (chopping off characters)

Jeremy Sanders jeremy at jeremysanders.net
Wed Apr 13 19:24:29 CEST 2005


I have a strange problem with distutils and package_data. I'm using python 
2.3.3, with the setuptools from CVS (so that I can use package_data).

My setup.py contains:

------------------------------------------------------------------------
#!/usr/bin/env python
# Veusz distutils setup script

# $Id: setup.py,v 1.2 2005/04/13 17:03:55 jeremysanders Exp $

import glob
from setuptools import setup

version = open('VERSION').read().strip()

descr = '''Veusz is a scientific plotting package, designed to create
publication-ready Postscript output. It features GUI, command-line,
and scripting interfaces. Graphs are constructed from "widgets",
allowing complex layouts to be designed. Veusz supports plotting
functions, data with errors, keys, labels, stacked plots,
multiple plots, and fitting data.'''

setup(name = 'veusz',
       version = version,
       description = 'A scientific plotting package',
       long_description = descr,
       author = 'Jeremy Sanders',
       author_email = 'jeremy at jeremysanders.net',
       url = 'http://home.gna.org/veusz/',
       license = 'GPL',
       classifiers = ['Programming Language :: Python',
                      'Development Status :: 4 - Beta',
                      'Environment :: X11 Applications :: Qt',
                      'Intended Audiance :: Advanced End Users',
                      'Licence :: OSI Approved :: '
                      'GNU General Public License (GPL)',
                      'Topic :: Scientific/Engineering :: Visualization'],
       package_dir = { 'veusz': '',
                       'veusz.dialogs': 'dialogs',
                       'veusz.document': 'document',
                       'veusz.setting': 'setting',
                       'veusz.utils': 'utils',
                       'veusz.widgets': 'widgets',
                       'veusz.windows': 'windows' },
       package_data = { 'veusz.windows': ['icons/*.png'],
                        'veusz': ['images/*.png'] },
       packages = ['veusz',
                   'veusz.dialogs',
                   'veusz.document',
                   'veusz.setting',
                   'veusz.utils',
                   'veusz.widgets',
                   'veusz.windows']
       )
------------------------------------------------------------

When it is run with
python setup.py bdist_rpm

I get,

running bdist
running bdist_dumb
running build
running build_py
creating build/lib/veusz/mages
error: can't copy 'mages/logo.png': doesn't exist or not a regular file

(I have tried removing the build and dist directories). Somehow the first 
character of 'images' has been chopped off. If I remove the package_data 
command, everything works (except the data don't get packaged).

Any ideas???

Thanks

Jeremy

-- 
Jeremy Sanders <jeremy at jeremysanders.net>
http://www.jeremysanders.net/                Cambridge, UK
Public Key Server PGP Key ID: E1AAE053


More information about the Distutils-SIG mailing list