Setuptools/Upgrade/Restarting

I upgraded my buildout configuration from

extends = 
   http://dist.plone.org/release/5.0/versions.cfg

find-links =
   http://dist.plone.org/release/5.0

to

extends = 
   http://dist.plone.org/release/5.0.2/versions.cfg

find-links =
   http://dist.plone.org/release/5.0.2

and buildout goes into an infinite loop like this...
Where is this coming from?

bin/buildout 
mr.developer: Queued 'omicron.policy' for checkout.
mr.developer: Skipped checkout of existing package 'omicron.policy'.
Upgraded:
  zc.buildout version 2.5.0,
  setuptools version 18.5;
restarting.
Generated script '/home/ajung/sandboxes/omicron_buildout/bin/buildout'.
mr.developer: Queued 'omicron.policy' for checkout.
mr.developer: Skipped checkout of existing package 'omicron.policy'.
Upgraded:
  setuptools version 18.5;
restarting.
mr.developer: Queued 'omicron.policy' for checkout.
mr.developer: Skipped checkout of existing package 'omicron.policy'.
Upgraded:
  setuptools version 18.5;
restarting.
mr.developer: Queued 'omicron.policy' for checkout.
mr.developer: Skipped checkout of existing package 'omicron.policy'.
Upgraded:
  setuptools version 18.5;
restarting.
mr.developer: Queued 'omicron.policy' for checkout.
mr.developer: Skipped checkout of existing package 'omicron.policy'.
Upgraded:
  setuptools version 18.5;
restarting.

Solution:

[versions]
zc.buildout = 2.5.0
setuptools = 20.1.1
1 Like

I fixed this in coredev last week.

Don't know if that gets propagated to the installers, or some extra action will be needed.

Maybe this isn't fixed in buildout.coredev

What worked for me was unpinning setuptools in versions.cfg

setuptools =

After that, I was able to run bin/buildout without an infinite upgrade/restarting loop

Came across similar issue this week while trying to create a Plone 5 theme package.

It started when I tried to run $ python bootstrap-buildout.py . I'd get this error:

Traceback (most recent call last):
  File "bootstrap-buildout.py", line 178, in <module>
    ws.require(requirement)
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 943, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 834, in resolve
    raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (zc.buildout 2.5.1 (/usr/local/lib/python2.7/site-packages), Requirement.parse('zc.buildout==2.5.2'))

If I ran python bootstrap-buildout.py -v 2.5.1 then $ ./bin/buildout I'd get stuck in this loop:

Upgraded:
  setuptools version 20.7.0;
restarting.
Upgraded:
  setuptools version 20.7.0;
restarting.
Upgraded:
  setuptools version 20.7.0;
restarting.
Upgraded:
  setuptools version 20.7.0;
restarting.
Upgraded:
  setuptools version 20.7.0;
restarting.
Traceback (most recent call last):
  File "./bin/buildout", line 9, in <module>
    import zc.buildout.buildout
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/zc/buildout/buildout.py", line 18, in <module>
    import zc.buildout.easy_install
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 26, in <module>
    import pkg_resources
  File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 35, in <module>
    import email.parser
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/email/parser.py", line 12, in <module>
    from email.feedparser import FeedParser
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/email/feedparser.py", line 27, in <module>
    from email import message
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/email/message.py", line 16, in <module>
    import email.charset
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/email/charset.py", line 13, in <module>
    import email.base64mime
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/email/base64mime.py", line 40, in <module>
    from email.utils import fix_eols
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/email/utils.py", line 32, in <module>
    from email._parseaddr import quote
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/email/_parseaddr.py", line 16, in <module>
    import time, calendar
  File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/calendar.py", line 10, in <module>
    import locale as _locale
ImportError: No module named locale

Runing python import locale did not resolve the error.

So a few things, call them FYIs or help in someone finding a solution:

  1. My Enviornment: Mac OSX 10.11.5 El Capitan with Homebrew (ran brew update, brew upgrade, and brew doctor multiple times (nothing to fix and no errors); brew uninstall python and then brew install python and then brew link --overwrite python and then checked all symlink files to make sure they were correct and they appeared to be.
  2. Alternate workarounds: Tried to create a theme package using mr.bob and python from Plone 5.0 UnifiedInstaller (rather than rely on my Homebrew installed python and pip installed mr.bob) and got the same errors.
  3. Case of too much information for non-developers—warning: rant follows Found out much later, with @tkimnguyen's help I didn't need to run $ ./bin/buildout to create a theme package. Apparently that is only necessary if I want to create a new theme package inside of a new Plone environment—but I didn't! I only wanted to create the theme package itself, which I would then add to an existing local Plone instance. Since I didn't know any better, I was following the directions from start to finish, even though that was not necessary. The docs should note the purpose of creating a theme package and how you can use it and that for non-developers, you don't need to complete all of the steps! I spent the better part of this week trying to fix these issue, of which I have no idea how to fix (and frankly, I don't care to learn how to fix them because I'm not a developer nor do I care to become one). Drives me crazy that so much of our explanations on how to do things take learners from steps 1-10 when really, only developers need to complete all the steps—us non-developer-types, we only need to complete steps 1-3, but have no way of knowing this without being told by someone who understands how all of this works. I'm tired, I'm frustrated, and fed up. We have got to come up with a better way of communicating with non-developers.
1 Like