Skip to content
This repository has been archived by the owner on Jul 11, 2019. It is now read-only.

Fix Python setup. #968

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open

Fix Python setup. #968

wants to merge 1 commit into from

Conversation

phihag
Copy link
Collaborator

@phihag phihag commented Sep 11, 2015

The Python setup was broken when it actually downloaded, since the last line in the bootstrap removes the pkg_resources module from sys.modules and we tried to reload it.
While we're at it, remove insecure and slow HTTP downloads in favor of bringing the file with us.

The Python setup was broken when it actually downloaded, since the last line in the bootstrap removes the pkg_resources module from sys.modules and we tried to reload it.
While we're at it, remove insecure and slow HTTP downloads in favor of bringing the file with us.
phihag added a commit that referenced this pull request Sep 11, 2015
Apart from taking quite a while to build and being horrifically insecure (by accident, we found out that we could have been executing arbitary Python code downloaded via HTTP from a spammer - see ##968) - the custom Python version does not build anymore, despite numerous bugfixes.

Even after fixing our code, collective.recipe.cmmi 0.5 cannot be built these days because of missing dependencies.

ALso, the very error message is broken:

    Got collective.recipe.cmmi 0.5.
    While:
    Installing.
    Getting section readline.
    Initializing section readline.
    Installing recipe collective.recipe.cmmi.

    An internal error occured due to a bug in either zc.buildout or in a
    recipe being used:
    Traceback (most recent call last):
    File "/home/phihag/adhocracy_buildout/python/eggs/zc.buildout-1.4.4-py2.7.egg/zc/buildout/buildout.py", line 1683, in main
        getattr(buildout, command)(args)
    File "/home/phihag/adhocracy_buildout/python/eggs/zc.buildout-1.4.4-py2.7.egg/zc/buildout/buildout.py", line 439, in install
        [self[part]['recipe'] for part in install_parts]
    File "/home/phihag/adhocracy_buildout/python/eggs/zc.buildout-1.4.4-py2.7.egg/zc/buildout/buildout.py", line 987, in __getitem__
        options._initialize()
    File "/home/phihag/adhocracy_buildout/python/eggs/zc.buildout-1.4.4-py2.7.egg/zc/buildout/buildout.py", line 1071, in _initialize
        recipe_class = _install_and_load(reqs, 'zc.buildout', entry, buildout)
    File "/home/phihag/adhocracy_buildout/python/eggs/zc.buildout-1.4.4-py2.7.egg/zc/buildout/buildout.py", line 1027, in _install_and_load
        allow_hosts=buildout._allow_hosts
    File "/home/phihag/adhocracy_buildout/python/eggs/zc.buildout-1.4.4-py2.7.egg/zc/buildout/easy_install.py", line 800, in install
        return installer.install(specs, working_set)
    File "/home/phihag/adhocracy_buildout/python/eggs/zc.buildout-1.4.4-py2.7.egg/zc/buildout/easy_install.py", line 662, in install
        [requirement] = err
    ValueError: too many values to unpack

Therefore, simply install PIL instead of a custom Python build.
@nidico
Copy link
Collaborator

nidico commented Oct 13, 2015

bootstrap.py usually comes from buildout, the current file is https://bootstrap.pypa.io/bootstrap-buildout.py and loads ez_setup.py through https. So the obvious way to achieve this would be to upgrade buildout. Have you tried that?

@joka
Copy link
Collaborator

joka commented Apr 13, 2016

Apart from fixing/updating boostrap, there is no need to force the custom python build, we could also use virtuelenv as a install option.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants