Upgrade from Plone 5.0.10 to 5.1-latest BTree 4.4.1

I am attempting to upgrade from Plone 5.0.10 to Plone 5.1-latest so that I can migrate to using Python3. I have run into an issue with a BTree requirement, but I cannot tell if it is instead an issue with zc.buildout, plone.recipe.zeoserver, or setuptools.

I have updated my buildout.cfg with:

extends =
    base.cfg
#    versions.cfg
    https://dist.plone.org/release/5.1-latest/versions.cfg

# If you change your Plone version, you'll also need to update
# the repository link below.
find-links +=
    https://dist.plone.org/release/5.1-latest

# change made for functools32 when going from 5.0.6 to 5.0-latest
find-links += https://pypi.python.org/project/functools32

index = https://pypi.python.org/simple

I am encountering an error:

Getting distribution for 'BTrees==4.4.1'.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/bin/Plone/zinstance/env/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 2147, in main
    lambda: setup(
  File "/usr/local/bin/Plone/zinstance/env/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 2133, in with_ei_usage
    return f()
  File "/usr/local/bin/Plone/zinstance/env/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 2150, in <lambda>
    distclass=DistributionWithoutHelpCommands, **kw
  File "/usr/lib/python2.7/distutils/core.py", line 151, in setup
    dist.run_commands()
  File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/usr/local/bin/Plone/zinstance/env/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 370, in run
    self.easy_install(spec, not self.no_deps)
  File "/usr/local/bin/Plone/zinstance/env/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 594, in easy_install
    return self.install_item(None, spec, tmpdir, deps, True)
  File "/usr/local/bin/Plone/zinstance/env/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 643, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/usr/local/bin/Plone/zinstance/env/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 833, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/usr/local/bin/Plone/zinstance/env/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1055, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/usr/local/bin/Plone/zinstance/env/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1040, in run_setup
    run_setup(setup_script, args)
  File "/usr/local/bin/Plone/zinstance/env/lib/python2.7/site-packages/setuptools/sandbox.py", line 68, in run_setup
    DirectorySandbox(setup_dir).run(runner)
  File "/usr/local/bin/Plone/zinstance/env/lib/python2.7/site-packages/setuptools/sandbox.py", line 114, in run
    return func()
  File "/usr/local/bin/Plone/zinstance/env/lib/python2.7/site-packages/setuptools/sandbox.py", line 67, in runner
    _execfile(setup_script, ns)
  File "/usr/local/bin/Plone/zinstance/env/lib/python2.7/site-packages/setuptools/sandbox.py", line 43, in _execfile
    exec(code, globals, locals)
  File "/tmp/easy_install-Lsk1pq/BTrees-4.4.1/setup.py", line 158, in <module>
  File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
    _setup_distribution = dist = klass(attrs)
  File "/usr/local/bin/Plone/zinstance/env/lib/python2.7/site-packages/setuptools/dist.py", line 271, in __init__
    self.fetch_build_eggs(attrs['setup_requires'])
  File "/usr/local/bin/Plone/zinstance/env/lib/python2.7/site-packages/setuptools/dist.py", line 317, in fetch_build_eggs
    replace_conflicting=True,
  File "/usr/local/bin/Plone/zinstance/env/lib/python2.7/site-packages/pkg_resources.py", line 627, in resolve
    dist = best[req.key] = env.best_match(req, ws, installer)
  File "/usr/local/bin/Plone/zinstance/env/lib/python2.7/site-packages/pkg_resources.py", line 879, in best_match
    return self.obtain(req, installer)
  File "/usr/local/bin/Plone/zinstance/env/lib/python2.7/site-packages/pkg_resources.py", line 891, in obtain
    return installer(requirement)
  File "/usr/local/bin/Plone/zinstance/env/lib/python2.7/site-packages/setuptools/dist.py", line 384, in fetch_build_egg
    return cmd.easy_install(req)
  File "/usr/local/bin/Plone/zinstance/env/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 613, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/usr/local/bin/Plone/zinstance/env/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 643, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/usr/local/bin/Plone/zinstance/env/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 833, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/usr/local/bin/Plone/zinstance/env/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1055, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/usr/local/bin/Plone/zinstance/env/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1040, in run_setup
    run_setup(setup_script, args)
  File "/usr/local/bin/Plone/zinstance/env/lib/python2.7/site-packages/setuptools/sandbox.py", line 68, in run_setup
    DirectorySandbox(setup_dir).run(runner)
  File "/usr/local/bin/Plone/zinstance/env/lib/python2.7/site-packages/setuptools/sandbox.py", line 114, in run
    return func()
  File "/usr/local/bin/Plone/zinstance/env/lib/python2.7/site-packages/setuptools/sandbox.py", line 67, in runner
    _execfile(setup_script, ns)
  File "/usr/local/bin/Plone/zinstance/env/lib/python2.7/site-packages/setuptools/sandbox.py", line 43, in _execfile
    exec(code, globals, locals)
  File "/tmp/easy_install-Lsk1pq/BTrees-4.4.1/temp/easy_install-pAmza8/persistent-4.5.1/setup.py", line 138, in <module>
  File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
    _setup_distribution = dist = klass(attrs)
  File "/usr/local/bin/Plone/zinstance/env/lib/python2.7/site-packages/setuptools/dist.py", line 271, in __init__
    self.fetch_build_eggs(attrs['setup_requires'])
  File "/usr/local/bin/Plone/zinstance/env/lib/python2.7/site-packages/setuptools/dist.py", line 317, in fetch_build_eggs
    replace_conflicting=True,
  File "/usr/local/bin/Plone/zinstance/env/lib/python2.7/site-packages/pkg_resources.py", line 595, in resolve
    requirements = list(requirements)[::-1]
  File "/usr/local/bin/Plone/zinstance/env/lib/python2.7/site-packages/pkg_resources.py", line 2668, in parse_requirements
    "version spec")
  File "/usr/local/bin/Plone/zinstance/env/lib/python2.7/site-packages/pkg_resources.py", line 2633, in scan_list
    raise ValueError(msg, line, "at", line[p:])
ValueError: ('Expected version spec in', "cffi ; platform_python_implementation == 'CPython'", 'at', " ; platform_python_implementation == 'CPython'")

I have searched the web extensively and not found anything that seems relevant. If anyone could help interpret the error, it would be a great help. Thanks!

For anyone encountering this error, I have found a post that was tremendously helpful in solving the problem.

See: 5.1.5 buildout chokes on "'extras_require' must be a dictionary" installing BTrees-4.4.1

I had to update my virtualenv zc.buildout and setuptools via pip and then subsequently version pin in my buildout.cfg.

env/bin/pip install --upgrade 'setuptools==40.8.0'
env/bin/pip install --upgrade 'zc.buildout==2.13.1'

2 Likes