I'm using zc.buildout (with zc.recipe.egg) since a long time to build my Python packages and deploy my running environments.
Since a few days, I can't use it anymore with any Python version higher to 3.5! :(
On startup, I receive an error (here in a Gitlab-CI job):
$ pip install zc.buildout
Collecting zc.buildout
Downloading zc.buildout-2.13.3-py2.py3-none-any.whl (153 kB)
Requirement already satisfied: setuptools>=8.0 in /usr/local/lib/python3.6/site-packages (from zc.buildout) (52.0.0)
Installing collected packages: zc.buildout
Successfully installed zc.buildout-2.13.3
$ buildout
Setting socket time out to 3 seconds.
Creating directory '/builds/G3v_6jyd/0/onf/support/python/pyramid/pyams-v2/pyams-security/develop-eggs'.
Develop: '/builds/G3v_6jyd/0/onf/support/python/pyramid/pyams-v2/pyams-security/.'
warning: no files found matching '*.txt'
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.*~' found anywhere in distribution
Couldn't develop '/builds/G3v_6jyd/0/onf/support/python/pyramid/pyams-v2/pyams-security/../ext/lingua' (not found)
Couldn't develop '/builds/G3v_6jyd/0/onf/support/python/pyramid/pyams-v2/pyams-security/../pyams_catalog' (not found)
Couldn't develop '/builds/G3v_6jyd/0/onf/support/python/pyramid/pyams-v2/pyams-security/../pyams_file' (not found)
Couldn't develop '/builds/G3v_6jyd/0/onf/support/python/pyramid/pyams-v2/pyams-security/../pyams_i18n' (not found)
Couldn't develop '/builds/G3v_6jyd/0/onf/support/python/pyramid/pyams-v2/pyams-security/../pyams_mail' (not found)
Couldn't develop '/builds/G3v_6jyd/0/onf/support/python/pyramid/pyams-v2/pyams-security/../pyams_site' (not found)
Couldn't develop '/builds/G3v_6jyd/0/onf/support/python/pyramid/pyams-v2/pyams-security/../pyams_utils' (not found)
Getting distribution for 'zc.recipe.egg==2.0.7'.
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: cannot import name 'main'
An error occurred when trying to install /tmp/tmp9eg4_d0rget_dist/zc.recipe.egg-2.0.7.tar.gz. Look above this message for any errors that were output by easy_install.
While:
Installing.
Getting section package.
Initializing section package.
Installing recipe zc.recipe.egg.
Getting distribution for 'zc.recipe.egg==2.0.7'.
An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/zc/buildout/buildout.py", line 2174, in main
getattr(buildout, command)(args)
File "/usr/local/lib/python3.6/site-packages/zc/buildout/buildout.py", line 701, in install
[self[part]['recipe'] for part in install_parts]
File "/usr/local/lib/python3.6/site-packages/zc/buildout/buildout.py", line 701, in <listcomp>
[self[part]['recipe'] for part in install_parts]
File "/usr/local/lib/python3.6/site-packages/zc/buildout/buildout.py", line 1324, in __getitem__
options._initialize()
File "/usr/local/lib/python3.6/site-packages/zc/buildout/buildout.py", line 1432, in _initialize
self.initialize()
File "/usr/local/lib/python3.6/site-packages/zc/buildout/buildout.py", line 1438, in initialize
recipe_class = _install_and_load(reqs, 'zc.buildout', entry, buildout)
File "/usr/local/lib/python3.6/site-packages/zc/buildout/buildout.py", line 1388, in _install_and_load
allow_hosts=buildout._allow_hosts
File "/usr/local/lib/python3.6/site-packages/zc/buildout/easy_install.py", line 957, in install
return installer.install(specs, working_set)
File "/usr/local/lib/python3.6/site-packages/zc/buildout/easy_install.py", line 682, in install
for dist in self._get_dist(requirement, ws):
File "/usr/local/lib/python3.6/site-packages/zc/buildout/easy_install.py", line 574, in _get_dist
dists = [_move_to_eggs_dir_and_compile(dist, self._dest)]
File "/usr/local/lib/python3.6/site-packages/zc/buildout/easy_install.py", line 1745, in _move_to_eggs_dir_and_compile
[tmp_loc] = glob.glob(os.path.join(tmp_dest, '*'))
ValueError: not enough values to unpack (expected 1, got 0)
I actually use the last setuptools version (52.0.0), and I need to be able to build my packages for all Python versions from 3.5 to 3.9...
Any idea?
Best regards,
Thierry
I encountered the same problem and believe I have found the underlying problem.
The latest setuptools
version (52.0.0) removed easy_install
which is used by zc.buildout
.
See this PR for reference: https://github.com/pypa/setuptools/pull/2544
To solve (at least for now), you can explicitly install/require a previous version of setuptools
.