From: Alex C. <ac...@ac...> - 2010-07-23 22:49:42
|
Hi, On 7/13/10 11:07 AM, in article AAN...@ma..., "Hanno Schlichting" <ha...@ha...> wrote: > Hi, > > On Tue, Jul 13, 2010 at 2:22 PM, Michael Mulich > <mr...@ps...> wrote: >> I've been fooling around with installing Plone via pip. The summary: You >> can't use pip to install Plone. At least for now you can't, because of >> pip's relation to Setuptools/Distribute. > > Yep. Many have tried before and it just won't really work. I have some > hope that once distutils2 is finished, it might be possible to use a > non zc.buildout stack to install Zope and Plone. But until Python's > packaging story has gotten better, there's not much we can do on the > Plone level. > >> The more verbose explanation is this: >> >> 1. "easy_install Plone" fails, because there is a lack of version >> pinning in Plone. Plus, easy_install installs packages in a linear >> fashion, which causes slight problems depending on the situation. Best >> practice at this point in time is to use pip. :) > > easy_install without a custom index will always "fail" or give you a > random package soup that can change any minute. We experimented with > putting version pins into packages a long time ago and this has proven > to cause more problems than it solves. As a result we have either > Known Good Sets in form of version.cfg files for buildout or custom > indexes for easy_install today. What you call a "lack of version > pinning" is a conscious design decision and not a bug. Package > distributions only specify hard constraints caused by API changes. > Information about working sets is managed externally. > >> 3. "pip install PinnedPlone" fails, because of the python-openid >> distribution on PyPI. There are actually two reasons this fails: 1) PyPI >> has no mirrors (btw, it will in the near future) 2) pip and easy_install >> don't use the PyPI API[1] to obtain distribution information, and >> therefore don't look for a 'download_url'. Manual download and >> installation of python-openid will resolve the issue though. > > I thought this was fixed with python-openid 2.2.5. There's a release > on PyPi now and the homepage points to the github project instead of > the non-functioning janrain site. You can also just: find-links = http://dist.plone.org/thirdparty/python-openid-2.2.4.tar.gz (or at least that's what I did when the 'missing openid incident' occurred) > >> 4. If using pip to install PinnedPlone "bin/zopectl fg" fails, because >> pip uses the setuptools command flag >> --single-version-externally-managed. If you'd like more information >> about this you can check out my ticket comment.[2] In short, the results >> of this command flag make a package look like a built-in module (e.g. >> the __repr__ of the plone package would look like "<module 'plone' >> (built-in)>"). This is a problem because packages like z3c.autoinclude, >> and therefore zope.configure, expect modules that have a __file__ >> attribute on the module, which built-in's do not have. > > Right. At some point we considered supporting zipped eggs and using > the pkg_resources API to avoid any dependency on __file__ pointers. > Unfortunately our codebase is full of references to __file__ and > together with the other problems of eggs, we haven't tried this path > any further. > >> So my question is... Where do I fix the issue? > > What issue specifically? So far you have listed problems in other > tools, but nothing specific to Plone or Zope. > > The current pkg_resources API isn't good enough to require it in all > our codebase (not to mention it's confusing packaging situation with > distribute/setuptools). I'm still waiting on the distutils2 > replacement, which should also handle installation according to > standard Linux system routines. Until that is finished and has proven > itself, I don't think there's anything we can do in Zope or Plone. > > Hanno > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first -- Alex Clark · http://aclark.net Author Plone 3.3 Site Administration · http://aclark.net/admin |