[Distutils] Not installing the install_requires
Peter Bengtsson
peterbe at gmail.com
Wed Jul 15 16:43:58 CEST 2009
Crap!
That didn't work either!
IOError: [Errno 20] Not a directory: '/home/peterbe/virtualenvs/
djangopeoplenet/lib/python2.5/site-packages/premailer-1.2-py2.5.egg/
premailer/version.txt'
This must be because of some egg magic that I don't understand.
What I did was this (in premailer.py):
__version__ = open(os.path.join(os.path.dirname(__file__),
'version.txt')
).read().strip()
That works if the thing is installed.
But not when trying to use it as an egg.
I tried to read P.J Eby's reply regarding using execfile() but it went
over my head.
On Jul 15, 2:16 pm, Jean-Paul Calderone <exar... at divmod.com> wrote:
> On Wed, 15 Jul 2009 04:29:05 -0700 (PDT), Peter Bengtsson <pete... at gmail.com> wrote:
> >I've just made a package
> >http://pypi.python.org/pypi/premailer
>
> >To figure out if I've got it right I've tried installing it like
> >this::
>
> > [snip - install failure log]
>
> >The setup.py
> >(seehttp://github.com/peterbe/premailer/tree/master)
> >contains the following:
>
> > install_requires=[
> > 'lxml',
> > ],
>
> >Why does easy_install not try to install lxml before it installs the
> >package?
>
> Because it has to evaluate your setup.py to learn that it requires lxml,
> but your setup.py *also* requires lxml, apparently because you're trying
> to avoid spelling our your package's version number more than once. This
> has been discussed recently on this list a couple times:
>
> http://mail.python.org/pipermail/distutils-sig/2009-May/011913.htmlhttp://mail.python.org/pipermail/distutils-sig/2009-July/012441.html
>
> The gist is that there is no way to declare things which your setup.py
> depends on, so if you depend on anything novel in it, it will probably
> fail like this for someone.
>
> Jean-Paul
> _______________________________________________
> Distutils-SIG maillist - Distutils-... at python.orghttp://mail.python.org/mailman/listinfo/distutils-sig
More information about the Distutils-SIG
mailing list