distutils directory problem

Martin Manns mmanns at gmx.net
Sun May 18 16:31:55 EDT 2008


Hi,

I have the following problem with the distutils package:
(I have now spent hours reading and searching the manuals and tutorials,
and I am still stuck.)

I have a working directory
~/pyspread
in which my libraries are situated and two icons directories
~/pyspread/icons and ~/pyspread/icons/actions

Now I would like to create a setup.py file inside my ~/pyspread
directory that installs my .py modules in .../site-packages/pyspread
and the icons in appropriate sub-folders and adds pyspread.pth to
.../site-packages so that .../site-packages/pyspread is in the
PYTHONPATH.

However, my setup.py puts everything  (including .pyc files) into
site-packages *and* into the sub-folders. What am I doing wrong?

I am looking for a platform-independent solution. Currently, I am using
python 2.5 on Linux.

Here my setup.py

#!/usr/bin/env python

from distutils.core import setup
setup(name='pyspread',
      version='0.0.7',
      description='A spreadsheet that accepts a pure python expression in each cell.',
      license='GPL v3 :: GNU General Public License',
      classifiers=[ 'Development Status :: 3 - Alpha',
                    'Intended Audience :: End Users/Desktop',
      ],
      author='Martin Manns',
      author_email='mmanns at gmx.net',
      url='http://sourceforge.net/projects/pyspread/',
      packages=['pyspread'],
      package_dir={'pyspread': '.'},
      scripts=['pyspread.py'],
      py_modules=['pyspread.mainapp', 'pyspread.pysgrid', 'pyspread.mygrid','pyspread.icontheme'],
      package_data={'pyspread': ['icons/*.png', 'icons/actions/*.png' ,\
                                 'test.pys', 'test.csv', 'test2.csv', \
                                 'README', 'COPYING']},
)


Thanks in advance

Martin





More information about the Python-list mailing list