Eggtestinfo - No local packages or download links found when running bin/buildout -c production.cfg

hi,

i have a tast to move old Plone site to new server,
at new server I installed Plone from UnifiedInstaller, and created a new Plone site,
the new Plone site worked.

Then I rsync var/ src/ *.cfg from old server to new server,
then i tried to run
bin/buildout -vD -c production.cfg
the process installed all own products at src/, but then it got such error:

Couldn't find index page for 'eggtestinfo' (maybe misspelled?)
No local packages or download links found for eggtestinfo
error: Could not find suitable distribution for Requirement.parse('eggtestinfo')
An error occurred when trying to install Products.CMFCore 2.2.10. Look above this message for any errors that were output by easy_install.
File "...../eggs/zc.buildout-1.7.1-py2.6.egg/zc/buildout/easy_install.py", line 588, in _call_easy_install
raise zc.buildout.UserError("Couldn't install: %s" % dist)
UserError: Couldn't install: Products.CMFCore 2.2.10

I tried to add eggtestinfo to eggs section at base.cfg

find-links =
eggtestinfo ยท PyPI

eggs =
eggtestinfo
but i still got the same error.

i dont know what to do with this eggtestinfo!

Please give a hint.
Many thanks.

PyPI was changed to allow https only (already some time ago). Unless either buildout (you need a sufficiently new version) or your local buildout configuration is aware of this, PyPI is inacessible for your buildout run -- and many packages are not found. Because your old server has already all packages installed, the problem may have been hidden there.

To check whether this is your problem add in the buildout section of your buildout configuration the definition index = https://pypi.python.org/simple and rerun your buildout.

Thank Maurer,
i had the first line in base.cfg :slight_smile:
[buildout]
index = Simple index

I even add full path for eggtestinfo to find-links section
find-links =
https://files.pythonhosted.org/packages/e0/8e/77c064957ea14137407e29abd812160eafc41b73a377c30d9e22d76f14fd/eggtestinfo-0.3.tar.gz

but the problem still remains with this eggtestinfo

Getting distribution for 'Products.CMFCore==2.2.10'.
Running easy_install:
..../Python-2.6/bin/python "-S" "-c" "import sys,os;p = sys.path[:];import site;sys.path[:] = p;[sys.modules.pop(k) for k, v in sys.modules.items() if hasattr(v, 'path') and len(v.path)==1 and not os.path.exists(os.path.join(v.path[0],'init.py'))];from setuptools.command.easy_install import main;main()" "-mUNxd" "..../client/eggs/tmpvoXBQY" "-q" "/tmp/tmpk8CZs0get_dist/Products.CMFCore-2.2.10.tar.gz"
path=..../client/eggs/distribute-0.6.28-py2.6.egg

Couldn't find index page for 'eggtestinfo' (maybe misspelled?)
No local packages or download links found for eggtestinfo
error: Could not find suitable distribution for Requirement.parse('eggtestinfo')

That is very strange: eggtestinfo is obviously available on PyPI. Maybe, your new server has some network problem and cannot reach PyPI.

I would try wget -S https://pypi.org/simple/eggtestinfo/ on your new server to check this (you may want to replace wget by your favorite download tool).

actually it is index = https://pypi.org/simple - but yours redirects anyway.

How is your Python installed? I once had a Python compiled without OpenSSL available, though Python was not able to work with https addresses. At least its worth a check.

This is using Python 2.6, which is old, and distribute instead of setuptools, which is old. So I can imagine that it does not work. Should be fixable though, hopefully without too much black magic.

Are you using a virtualenv? Then pip install eggtestinfo might help. After that, buildout should work again, I guess. (Without a virtualenv you an still try it, but then eggtestinfo will be installed in your global Python site packages.)

Otherwise, maybe first try a very simple buildout config just to to get eggtestinfo:

[buildout]
index = https://pypi.org/simple
parts = temporary

[temporary]
recipe = zc.recipe.egg
eggs = eggtestinfo

Maybe put this in a file temp.cfg and explicitly do bin/buildout -c temp.cfg install temporary

IIRC the problem with eggtestinfo is that it is a 'low level' dependency when another package (like CMFCore) has to be installed and distutils/distribute takes over: it never gets/sees/fetches the alternative index info from buildout.

As Maurits suggested:
We had eggtestinfo in our requirement.txt for a while for some older Plone 4 projects so that pip would install it behind a firewall from the local eggproxy: and it would already be on the PYTHONPATH: when setuptools/disutils tried to download it had no connection to pypi.

[ I remember seeing similar issues with some packages that depended on other python modules to calculate calculate the version in setup.py based on VCS info, those packages also failed to install in a buildout without direct internet acces and it refused to pick up our proxy/index references. ]

thank you guys for your time and ideas,

@fredvd i have openssl installed.

@mauritsvanrees
i tried to run you temp.cfg and it ended immediatelly when installing setuptools-49.3.1.zip:

client]$ bin/buildout -vD -c temp.cfg
Installing 'zc.buildout', 'setuptools'.
We have the distribution that satisfies 'zc.buildout==1.4.4'.
We have the best distribution that satisfies 'distribute'.
Picked: distribute = 0.7.3
Getting required 'setuptools>=0.7'
required by distribute 0.7.3.
We have no distributions for setuptools that satisfies 'setuptools>=0.7'.
Getting distribution for 'setuptools>=0.7'.
Running easy_install:
/srv/data/intranet/Python-2.6/bin/python "-c" "from setuptools.command.easy_install import main; main()" "-mUNxd" "/srv/data/intranet/client/eggs/tmp2M7ZbF" "-q" "/tmp/tmpgbKNtTget_dist/setuptools-49.3.1.zip"
path=/srv/data/intranet/buildout-cache/eggs/distribute-0.6.24-py2.6.egg

Traceback (most recent call last):
File "", line 1, in
File "/srv/data/intranet/Python-2.6/lib/python2.6/site-packages/distribute-0.6.19-py2.6.egg/setuptools/command/easy_install.py", line 1864, in main
with_ei_usage(lambda:
File "/srv/data/intranet/Python-2.6/lib/python2.6/site-packages/distribute-0.6.19-py2.6.egg/setuptools/command/easy_install.py", line 1845, in with_ei_usage
return f()
File "/srv/data/intranet/Python-2.6/lib/python2.6/site-packages/distribute-0.6.19-py2.6.egg/setuptools/command/easy_install.py", line 1868, in
distclass=DistributionWithoutHelpCommands, **kw
File "/srv/data/intranet/Python-2.6/lib/python2.6/distutils/core.py", line 152, in setup
dist.run_commands()
File "/srv/data/intranet/Python-2.6/lib/python2.6/distutils/dist.py", line 975, in run_commands
self.run_command(cmd)
File "/srv/data/intranet/Python-2.6/lib/python2.6/distutils/dist.py", line 995, in run_command
cmd_obj.run()
File "/srv/data/intranet/Python-2.6/lib/python2.6/site-packages/distribute-0.6.19-py2.6.egg/setuptools/command/easy_install.py", line 345, in run
self.easy_install(spec, not self.no_deps)
File "/srv/data/intranet/Python-2.6/lib/python2.6/site-packages/distribute-0.6.19-py2.6.egg/setuptools/command/easy_install.py", line 565, in easy_install
return self.install_item(None, spec, tmpdir, deps, True)
File "/srv/data/intranet/Python-2.6/lib/python2.6/site-packages/distribute-0.6.19-py2.6.egg/setuptools/command/easy_install.py", line 615, in install_item
dists = self.install_eggs(spec, download, tmpdir)
File "/srv/data/intranet/Python-2.6/lib/python2.6/site-packages/distribute-0.6.19-py2.6.egg/setuptools/command/easy_install.py", line 805, in install_eggs
return self.build_and_install(setup_script, setup_base)
File "/srv/data/intranet/Python-2.6/lib/python2.6/site-packages/distribute-0.6.19-py2.6.egg/setuptools/command/easy_install.py", line 1082, in build_and_install
self.run_setup(setup_script, setup_base, args)
File "/srv/data/intranet/Python-2.6/lib/python2.6/site-packages/distribute-0.6.19-py2.6.egg/setuptools/command/easy_install.py", line 1071, in run_setup
run_setup(setup_script, args)
File "/srv/data/intranet/Python-2.6/lib/python2.6/site-packages/distribute-0.6.19-py2.6.egg/setuptools/sandbox.py", line 30, in run_setup
lambda: execfile(
File "/srv/data/intranet/Python-2.6/lib/python2.6/site-packages/distribute-0.6.19-py2.6.egg/setuptools/sandbox.py", line 72, in run
return func()
File "/srv/data/intranet/Python-2.6/lib/python2.6/site-packages/distribute-0.6.19-py2.6.egg/setuptools/sandbox.py", line 32, in
{'file':setup_script, 'name':'main'}
File "setup.py", line 175, in
File "setup.py", line 49, in _gen_console_scripts
ValueError: zero length field name in format
An error occured when trying to install setuptools 49.3.1. Look above this message for any errors that were output by easy_install.
While:
Installing.
Checking for upgrades.
Getting distribution for 'setuptools>=0.7'.
Traceback (most recent call last):
File "/srv/data/intranet/buildout-cache/eggs/zc.buildout-1.4.4-py2.6.egg/zc/buildout/buildout.py", line 1683, in main
getattr(buildout, command)(args)
File "/srv/data/intranet/buildout-cache/eggs/zc.buildout-1.4.4-py2.6.egg/zc/buildout/buildout.py", line 404, in install
self._maybe_upgrade()
File "/srv/data/intranet/buildout-cache/eggs/zc.buildout-1.4.4-py2.6.egg/zc/buildout/buildout.py", line 827, in _maybe_upgrade
allow_hosts = self._allow_hosts
File "/srv/data/intranet/buildout-cache/eggs/zc.buildout-1.4.4-py2.6.egg/zc/buildout/easy_install.py", line 800, in install
return installer.install(specs, working_set)
File "/srv/data/intranet/buildout-cache/eggs/zc.buildout-1.4.4-py2.6.egg/zc/buildout/easy_install.py", line 670, in install
for dist in self._get_dist(requirement, ws, self._always_unzip
File "/srv/data/intranet/buildout-cache/eggs/zc.buildout-1.4.4-py2.6.egg/zc/buildout/easy_install.py", line 543, in _get_dist
dist.location, ws, self._dest, dist)
File "/srv/data/intranet/buildout-cache/eggs/zc.buildout-1.4.4-py2.6.egg/zc/buildout/easy_install.py", line 351, in _call_easy_install
raise zc.buildout.UserError("Couldn't install: %s" % dist)
UserError: Couldn't install: setuptools 49.3.1

Starting pdb:

/srv/data/intranet/buildout-cache/eggs/zc.buildout-1.4.4-py2.6.egg/zc/buildout/easy_install.py(351)_call_easy_install()
-> raise zc.buildout.UserError("Couldn't install: %s" % dist)
(Pdb)

the error is at same line/file as eggtestinfo case
if not dists:
raise zc.buildout.UserError("Couldn't install: %s" % dist):

def _call_easy_install(self, spec, ws, dest, dist):

    tmp = tempfile.mkdtemp(dir=dest)
    try:
        path = setuptools_loc

        args = ('-c', _easy_install_cmd, '-mUNxd', _safe_arg(tmp))
        if self._always_unzip:
            args += ('-Z', )
        level = logger.getEffectiveLevel()
        if level > 0:
            args += ('-q', )
        elif level < 0:
            args += ('-v', )

        args += (_safe_arg(spec), )

        if level <= logging.DEBUG:
            logger.debug('Running easy_install:\n%s "%s"\npath=%s\n',
                         self._executable, '" "'.join(args), path)

        if is_jython:
            extra_env = dict(os.environ, PYTHONPATH=path)
        else:
            args += (dict(os.environ, PYTHONPATH=path), )

        sys.stdout.flush() # We want any pending output first

        if is_jython:
            exit_code = subprocess.Popen(
            [_safe_arg(self._executable)] + list(args),
            env=extra_env).wait()
        else:
            exit_code = os.spawnle(
                os.P_WAIT, self._executable, _safe_arg (self._executable),
                *args)

        dists = []
        env = pkg_resources.Environment(
            [tmp],
            python=_get_version(self._executable),
            )
        for project in env:
            dists.extend(env[project])

        if exit_code:
            logger.error(
                "An error occured when trying to install %s. "
                "Look above this message for any errors that "
                "were output by easy_install.",
                dist)

        if not dists:
            raise zc.buildout.UserError("Couldn't install: %s" % dist)

That's way too new for setuptools. For python2.7 , keep setuptools pinned to max 42.0.2 . For reference, see https://github.com/plone/buildout.coredev/blob/5.2/requirements.txt .

this is the pinnings file for Plone 5.2 'development' buildout, which has to run with both Python 2.x and 3.x

(oh and for old old stuff, the 'official' pinned versions in the Plone 4.3 branch are even lower, fixed to buildout 1.x and setuptools 26.1.1). But we stilll maintain some Plone 4 sites with buildout 2.13.3 and setuptools 42.0.2 on python 2.7.17/18) -> https://github.com/plone/buildout.coredev/blob/4.3/requirements.txt

hi again,
finally we decided to upgrade our plone 4.1 intranet to plone 5.2,
i tried to follow Niteo
but the process is too complicated, i need your hints

Here are my steps:

/usr/local/bin/python3.6 -m venv .
source bin/activate

cat requirements.txt
setuptools==41.0.1
zc.buildout==2.13.2

./bin/pip3.6 install -r requirements.txt

then i copied eggs/ src/ from old intranet plone 4.1 site to current directory,
in next step i edited the base.cfg:

[buildout]
index = Simple index

parts =
lxml
pylxml
#instance
backup
repozo
zopeskel

extends =
lxml.cfg
versions_41.cfg
#keep plone 5.2 versions.cfg after version_41.cfg
http://dist.plone.org/release/5.2/versions.cfg

versions = versions

extensions =
#lovely.buildouthttp
mr.developer

find-links =
#Index of /release/4.1.4/
Index of /thirdparty/
/home/zope/lc_repo/

eggs =
#own eggs....
intra.base

then i run
bin/buildout -v -c production.cfg
it stoped when trying to install our own egg, intra.base
at plone 4.1 site i see intra.base is only present at eggs/ directory
not at src/

i tried to add git https://....intra.base.git to [sources] section, but it could not help.

So the problem is, i have source code of intra.base in eggs/ dir,
but how to tell bin/buildout to know about this?

Many thanks for your help.