4teamwork / ftw.upgrade

An upgrade control panel and upgrade helpers for plone upgrades.
6 stars 10 forks source link

Newer versions of path.py dependency are causing errors #167

Closed hvelarde closed 6 years ago

hvelarde commented 6 years ago

Like this:

$ bin/buildout
...
Getting distribution for 'importlib_metadata>=0.5'.
warning: no previously-included files found matching '.gitignore'
no previously-included directories found matching 'build'
no previously-included directories found matching '.tox'
warning: install_lib: 'build/lib' does not exist -- no Python modules to install

zip_safe flag not set; analyzing archive contents...
Installing importlib-metadata 0.5
Caused installation of a distribution:
UNKNOWN 0.0.0
with a different project name.
Installing importlib-metadata 0.5
Caused installation of a distribution:
UNKNOWN 0.0.0
with a different version.
Got None.
While:
  Installing instance.
Error: There is a version conflict.
We already have: UNKNOWN 0.0.0
but path.py 11.4.1 requires 'importlib_metadata>=0.5'.

see: https://travis-ci.org/collective/collective.liveblog/jobs/435360599

jone commented 6 years ago

@hvelarde The builds of ftw.upgrade are working well with 11.4.1: https://ci.4teamwork.ch/builds/192531 You probably have a conflict with another addon you have installed. ftw.upgrade works with path.py >= 6.2 - did you try pinning down path.py?

hvelarde commented 6 years ago

that may be a setuptools issue; what version are you using?

jone commented 6 years ago

In the tests of ftw.upgrade we are not pinning dependencies, other than using the Plone KGS and some exceptions. The used versions are visible in the build logs (buildout): https://ci.4teamwork.ch/builds/192531

hvelarde commented 6 years ago

you seem to be using setuptools = 33.1.1, I'm using setuptools = 26.1.1.

mauritsvanrees commented 5 years ago

I see something similar with Plone 5.1.4 or 5.1.5-pending and ftw.upgrade:

$ cat buildout.cfg
[buildout]
extends =
    http://dist.plone.org/release/5.1.5-pending/versions.cfg
parts =
    instance

[instance]
recipe = plone.recipe.zope2instance
user = admin:admin
eggs =
    Plone
    ftw.upgrade
$ virtualenv -p python2.7 .
$ curl -O http://dist.plone.org/release/5.1.5-pending/requirements.txt
$ bin/pip install -r requirements.txt 
$ bin/buildout 
Uninstalling instance.
Unused options for buildout: 'zope-directory'.
Installing instance.
Getting distribution for 'importlib_metadata>=0.5'.
/anaconda2/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'use_scm_version'
  warnings.warn(msg)
warning: no previously-included files found matching '.gitignore'
no previously-included directories found matching 'build'
no previously-included directories found matching '.tox'
zip_safe flag not set; analyzing archive contents...
While:
  Installing instance.
  Getting distribution for 'importlib_metadata>=0.5'.

An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "/Users/maurits/tmp/testplone/lib/python2.7/site-packages/zc/buildout/buildout.py", line 2127, in main
    getattr(buildout, command)(args)
  File "/Users/maurits/tmp/testplone/lib/python2.7/site-packages/zc/buildout/buildout.py", line 797, in install
    installed_files = self[part]._call(recipe.install)
  File "/Users/maurits/tmp/testplone/lib/python2.7/site-packages/zc/buildout/buildout.py", line 1557, in _call
    return f()
  File "/Users/maurits/shared-eggs/cp27m/plone.recipe.zope2instance-4.4.1-py2.7.egg/plone/recipe/zope2instance/__init__.py", line 169, in install
    installed.extend(self.install_scripts())
  File "/Users/maurits/shared-eggs/cp27m/plone.recipe.zope2instance-4.4.1-py2.7.egg/plone/recipe/zope2instance/__init__.py", line 668, in install_scripts
    requirements, ws = self.egg.working_set(['plone.recipe.zope2instance'])
  File "/Users/maurits/shared-eggs/cp27m/zc.recipe.egg-2.0.5-py2.7.egg/zc/recipe/egg/egg.py", line 84, in working_set
    allow_hosts=self.allow_hosts,
  File "/Users/maurits/shared-eggs/cp27m/zc.recipe.egg-2.0.5-py2.7.egg/zc/recipe/egg/egg.py", line 162, in _working_set
    allow_hosts=allow_hosts)
  File "/Users/maurits/tmp/testplone/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 924, in install
    return installer.install(specs, working_set)
  File "/Users/maurits/tmp/testplone/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 726, in install
    for dist in self._get_dist(req, ws):
  File "/Users/maurits/tmp/testplone/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 570, in _get_dist
    dists = [_move_to_eggs_dir_and_compile(dist, self._dest)]
  File "/Users/maurits/tmp/testplone/lib/python2.7/site-packages/zc/buildout/easy_install.py", line 1712, in _move_to_eggs_dir_and_compile
    os.rename(tmp_loc, newloc)
OSError: [Errno 66] Directory not empty

When I remove ftw.upgrade from the eggs, buildout works fine. When I first bin/pip install importlib_metadata, the next buildout with ftw.upgrade works fine too.