Ariel
Ariel

Reputation: 21

Plone 4.3 AssertionError Running Buildout

We recently got a new Linux machine that got re-imaged from our older machine where our current plone installation resides. I am trying to run buildout on the new machine but I am getting this AssertionError on our plonetheme src product.

Installing 'buildout.dumppickedversions', 'buildout.sanitycheck'.
We have the distribution that satisfies 'buildout.dumppickedversions==0.5'.
Picked: buildout.sanitycheck = 1.0b1
Develop: '/var/db/zope/plone43/zeocluster/src/products.okctypes'
in: '/var/db/zope/plone43/zeocluster/src/products.okctypes'
/tmp/tmpVPeu_l -q develop -mxN -d /var/db/zope/plone43/zeocluster/develop-eggs/tmp4eer1vbuild
Develop: '/var/db/zope/plone43/zeocluster/src/plonetheme.ourtheme'
in: '/var/db/zope/plone43/zeocluster/src/plonetheme.ourtheme'
/tmp/tmppWGq8Z -q develop -mxN -d /var/db/zope/plone43/zeocluster/develop-eggs/tmpUl2ukSbuild
No local packages or download links found for PasteScript
Traceback (most recent call last):
  File "/tmp/tmppWGq8Z", line 11, in <module>
    execfile('/var/db/zope/plone43/zeocluster/src/plonetheme.ourtheme/setup.py')
  File "/var/db/zope/plone43/zeocluster/src/plonetheme.ourtheme/setup.py", line 37, in <module>
    paster_plugins=["ZopeSkel"],
  File "/var/db/zope/plone43/Python-2.7/lib/python2.7/distutils/core.py", line 112, in setup
    _setup_distribution = dist = klass(attrs)
  File "/var/db/zope/plone43/buildout-cache/eggs/distribute-0.6.28-py2.7.egg/setuptools/dist.py", line 221, in __init__
    self.fetch_build_eggs(attrs.pop('setup_requires'))
  File "/var/db/zope/plone43/buildout-cache/eggs/distribute-0.6.28-py2.7.egg/setuptools/dist.py", line 245, in fetch_build_eggs
    parse_requirements(requires), installer=self.fetch_build_egg
  File "/var/db/zope/plone43/buildout-cache/eggs/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 580, in resolve
    dist = best[req.key] = env.best_match(req, self, installer)
  File "/var/db/zope/plone43/buildout-cache/eggs/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 825, in best_match
    return self.obtain(req, installer) # try and download/install
  File "/var/db/zope/plone43/buildout-cache/eggs/distribute-0.6.28-py2.7.egg/pkg_resources.py", line 837, in obtain
    return installer(requirement)
  File "/var/db/zope/plone43/buildout-cache/eggs/distribute-0.6.28-py2.7.egg/setuptools/dist.py", line 294, in fetch_build_egg
    return cmd.easy_install(req)
  File "/var/db/zope/plone43/buildout-cache/eggs/distribute-0.6.28-py2.7.egg/setuptools/command/easy_install.py", line 592, in easy_install
    raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('PasteScript')
While:
  Installing.
  Processing develop directory '/var/db/zope/plone43/zeocluster/src/plonetheme.ourtheme'.

An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "/var/db/zope/plone43/buildout-cache/eggs/zc.buildout-1.7.1-py2.7.egg/zc/buildout/buildout.py", line 1866, in main
    getattr(buildout, command)(args)
  File "/var/db/zope/plone43/buildout-cache/eggs/zc.buildout-1.7.1-py2.7.egg/zc/buildout/buildout.py", line 487, in install
    installed_develop_eggs = self._develop()
  File "/var/db/zope/plone43/buildout-cache/eggs/zc.buildout-1.7.1-py2.7.egg/zc/buildout/buildout.py", line 727, in _develop
    zc.buildout.easy_install.develop(setup, dest)
  File "/var/db/zope/plone43/buildout-cache/eggs/zc.buildout-1.7.1-py2.7.egg/zc/buildout/easy_install.py", line 1184, in develop
    *args) == 0
AssertionError
*************** PICKED VERSIONS ****************
[versions]

*************** /PICKED VERSIONS ***************

Our Product's init.py script contains the following:

# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages
try:
    __import__('pkg_resources').declare_namespace(__name__)
except ImportError:
    from pkgutil import extend_path
    __path__ = extend_path(__path__, __name__)

I've seen a similar error reported here but the answer provided does not apply to our case. We have other products in src but this is the only one causing problems.

Can someone please help us with this error?

Upvotes: 2

Views: 272

Answers (1)

SteveM
SteveM

Reputation: 6048

Check the setup.py file in your theme package. You'll likely find:

# The next two lines may be deleted after you no longer need
# addcontent support from paster and before you distribute
# your package.
setup_requires=["PasteScript"],
paster_plugins = ["ZopeSkel"],

Remove those lines. They are included in the generated template for your package so that you may use Zopeskel local commands to add new functionality. You don't need it after development, and it's often a source of problems later.

The alternative solution, as mentioned in the comments, is to make sure you have the right egg in your local buildout cache. But why have old development packages sitting around on a live site?

Upvotes: 3

Related Questions