plone / plonecli

Plone Command Line Client - for creating and working with custom add-ons and themes
https://pypi.org/project/plonecli/
Other
19 stars 10 forks source link

plonecli build after creating addon errors out with: Couldn't install: flake8 3.3.0 #15

Closed pigeonflight closed 6 years ago

pigeonflight commented 6 years ago

Description

I created a new package and was attempting to build.

What I Did

plonelci create addon example.staff
cd example.staff
plonecli build

This is the resulting traceback

Got flake8-debugger 1.4.0.
Getting distribution for 'flake8-coding==1.3.0'.
zip_safe flag not set; analyzing archive contents...
Got flake8-coding 1.3.0.
Getting distribution for 'flake8-blind-except==0.1.1'.
Got flake8-blind-except 0.1.1.
Getting distribution for 'flake8==3.3.0'.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/cabox/workspace/example.staff/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1943, in main
    with_ei_usage(lambda:
  File "/home/cabox/workspace/example.staff/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1930, in with_ei_usage
    return f()
  File "/home/cabox/workspace/example.staff/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1947, 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 "/home/cabox/workspace/example.staff/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 360, in run
    self.easy_install(spec, not self.no_deps)
  File "/home/cabox/workspace/example.staff/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 576, in easy_install
    return self.install_item(None, spec, tmpdir, deps, True)
  File "/home/cabox/workspace/example.staff/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 625, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/home/cabox/workspace/example.staff/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 822, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/home/cabox/workspace/example.staff/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1028, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/home/cabox/workspace/example.staff/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1013, in run_setup
    run_setup(setup_script, args)
  File "/home/cabox/workspace/example.staff/lib/python2.7/site-packages/setuptools/sandbox.py", line 50, in run_setup
    lambda: execfile(
  File "/home/cabox/workspace/example.staff/lib/python2.7/site-packages/setuptools/sandbox.py", line 100, in run
    return func()
  File "/home/cabox/workspace/example.staff/lib/python2.7/site-packages/setuptools/sandbox.py", line 52, in <lambda>
    {'__file__':setup_script, '__name__':'__main__'}
  File "setup.py", line 134, in <module>

  File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
    _setup_distribution = dist = klass(attrs)
  File "/home/cabox/workspace/example.staff/lib/python2.7/site-packages/setuptools/dist.py", line 260, in __init__
    self.fetch_build_eggs(attrs.pop('setup_requires'))
  File "/home/cabox/workspace/example.staff/lib/python2.7/site-packages/setuptools/dist.py", line 285, in fetch_build_eggs
    replace_conflicting=True
  File "/home/cabox/workspace/example.staff/lib/python2.7/site-packages/pkg_resources/__init__.py", line 846, in resolve
    dist = best[req.key] = env.best_match(req, ws, installer)
  File "/home/cabox/workspace/example.staff/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1118, in best_match
    return self.obtain(req, installer)
  File "/home/cabox/workspace/example.staff/lib/python2.7/site-packages/pkg_resources/__init__.py", line 1130, in obtain
    return installer(requirement)
  File "/home/cabox/workspace/example.staff/lib/python2.7/site-packages/setuptools/dist.py", line 335, in fetch_build_egg
    return cmd.easy_install(req)
  File "/home/cabox/workspace/example.staff/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 595, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/home/cabox/workspace/example.staff/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 625, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/home/cabox/workspace/example.staff/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 822, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/home/cabox/workspace/example.staff/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1028, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/home/cabox/workspace/example.staff/lib/python2.7/site-packages/setuptools/command/easy_install.py", line 1013, in run_setup
    run_setup(setup_script, args)
  File "/home/cabox/workspace/example.staff/lib/python2.7/site-packages/setuptools/sandbox.py", line 50, in run_setup
    lambda: execfile(
  File "/home/cabox/workspace/example.staff/lib/python2.7/site-packages/setuptools/sandbox.py", line 100, in run
    return func()
  File "/home/cabox/workspace/example.staff/lib/python2.7/site-packages/setuptools/sandbox.py", line 52, in <lambda>
    {'__file__':setup_script, '__name__':'__main__'}
  File "setup.py", line 68, in <module>

  File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
    _setup_distribution = dist = klass(attrs)
  File "/home/cabox/workspace/example.staff/lib/python2.7/site-packages/setuptools/dist.py", line 264, in __init__
    _Distribution.__init__(self,attrs)
  File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__
    self.finalize_options()
  File "/home/cabox/workspace/example.staff/lib/python2.7/site-packages/setuptools/dist.py", line 298, in finalize_options
    ep.load()(self, ep.name, value)
  File "/home/cabox/workspace/example.staff/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2291, in load
    return self.resolve()
  File "/home/cabox/workspace/example.staff/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2301, in resolve
    raise ImportError(str(exc))
ImportError: 'module' object has no attribute 'check_specifier'
An error occurred when trying to install flake8 3.3.0. Look above this message for any errors that were output by easy_install.
While:
  Installing.
  Getting section code-analysis.
  Initializing section code-analysis.
  Installing recipe plone.recipe.codeanalysis[recommended].
  Getting distribution for 'flake8==3.3.0'.
Error: Couldn't install: flake8 3.3.0

Workaround

In the addon directory I ran

bin/pip install flake8==3.3.0

Then reissued the command

plonecli build
MrTango commented 6 years ago

Could you please try with the current version again. I can't reproduce this error, but it might depend on the OS too. Not sure who we can fix this then, other than dcument working versions.

MrTango commented 6 years ago

And btw it probably more related to bobtemplates.plone than to plonecli.

MrTango commented 6 years ago

I close this for now, please reopen it or better open one in bobtemplates.plone repo