[Distutils] Help with easy_install
Phillip J. Eby
pje at telecommunity.com
Sun Nov 30 23:17:52 CET 2008
At 10:03 PM 11/30/2008 +0000, Martin Manns wrote:
>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.
From reading your setup script, I don't understand why your package
needs a .pth file of its own, let alone why it's writing it directly
in the setup script. I would expect it to work correctly if you
simply delete that portion of the setup script. In fact, it works
for me that way.
One other thing you need to change if you want easy_install to handle
dependencies:
> requires=['numpy (>=1.1)', 'wx (>=2.7)'],
Either change this line (or add another) saying:
install_requires=["numpy>=1.1", "wx>=2.7"],
Also note that this line is superfluous (neither distutils nor
setuptools need it):
> package_dir={'pyspread': 'pyspread'},
And of course, delete the entire block below; as far as I can tell,
it's not needed for distutils or setuptools.
>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