Commit 54f42c38 authored by Jérome Perrin's avatar Jérome Perrin

SlapOS: don't fetch setup_requires eggs

Instead of installing setup_requires, which escapes buildout versions
constraints and allow-picked-versions, we disallow setup_requires to
install any missing packages. The packages are supposed to have been
installed earlier, by using setup-eggs= option of zc.recipe.egg:custom
or other variants of this recipe.
parent 7e97def4
......@@ -10,6 +10,8 @@ from distutils.errors import DistutilsOptionError
from distutils.util import convert_path
from fnmatch import fnmatchcase
import pkg_resources
from ._deprecation_warning import SetuptoolsDeprecationWarning
from setuptools.extern.six import PY3, string_types
......@@ -136,7 +138,10 @@ def _install_setup_requires(attrs):
# Honor setup.cfg's options.
dist.parse_config_files(ignore_option_errors=True)
if dist.setup_requires:
dist.fetch_build_eggs(dist.setup_requires)
# XXX SlapOS patch:
# we expect setup_requires to be already installed at this point
# instead of installing them, we throw an error if they are missing.
pkg_resources.WorkingSet().require(dist.setup_requires)
def setup(**attrs):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment