[Distutils] Help with easy_install
Martin Manns
mmanns at gmx.net
Sun Nov 30 23:03:30 CET 2008
Hi,
I am developing a small pet project that I call pyspread (A small spreadsheet
that accepts Python in cells, further info at: http://pyspread.sf.net).
Now some users complained that it does not install correctly with easy_install
even though distutils work. I tried for some time fixing it, but I was not too
successful.
The main problem is that the .pth file and the subdirectory are not created on
installation, which works all right with python setup.py install.
First, I thought that my easy_install installation is broken (I am using Debian
testing with the version in the apt repository). However, after I read a few
posts in this list, I believe that I stumbled into some gotchas that are
definitively not in the main download page manual.
Any idea how I could get the directories set up with easy install?
Is this in a FAQ that I am unaware of?
My setup.py code is posted below.
You can find the bug report at
http://sourceforge.net/tracker/index.php?func=detail&aid=2036736&group_id=224598&atid=1062244
Thanks in advance
Regards
Martin
--- setup.py ---
#!/usr/bin/env python
from distutils.core import setup
from distutils.sysconfig import get_python_lib
setup(name='pyspread',
version='0.0.10a',
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/',
requires=['numpy (>=1.1)', 'wx (>=2.7)'],
scripts=['pyspread/pyspread.py'],
packages=['pyspread'],
package_dir={'pyspread': 'pyspread'},
package_data={'pyspread': ['icons/*.png', 'icons/actions/*.png', \
'examples/*', \
'doc/manual.html', 'README', 'COPYING']},
)
import distutils.sysconfig
try:
pthfile = open(get_python_lib() + "/pyspread.pth", 'w')
pthfile.write("pyspread")
pthfile.close()
except IOError:
print 'Creation of ' + distutils.sysconfig.get_python_lib() + ' pyspread.pth
failed.'
More information about the Distutils-SIG
mailing list