• Jérome Perrin's avatar
    bootstrap: fix call to easy_install.scripts · de5e5d50
    Jérome Perrin authored
    This function is supposed to be called with script names and a directory
    to store the scripts, as described in
    https://github.com/buildout/buildout/blob/2.7.1/src/zc/buildout/easy_install.txt#L478
    
    Passing an absolute path for script name and None as directory was OK on
    python <= 3.5, because:
      os.path.join(None, '/absolute/path')
    returns '/absolute/path', but on python >= 3.6 this is no longer the
    case and failed with:
    
        Traceback (most recent call last):
          File "slapos.buildout/src/zc/buildout/buildout.py", line 2240, in main
            getattr(buildout, command)(args)
          File "slapos.buildout/src/zc/buildout/buildout.py", line 643, in install
            self._install_parts(install_args)
          File "slapos.buildout/src/zc/buildout/buildout.py", line 658, in _install_parts
            self._setup_directories()
          File "slapos.rebootstrap/slapos/rebootstrap/__init__.py", line 37, in wrapper
            return getattr(self, attr)(*args, **kw)
          File "slapos.rebootstrap/slapos/rebootstrap/__init__.py", line 72, in _setup_directories
            setup_script(new_bin, self.wanted_python)
          File "slapos.rebootstrap/slapos/rebootstrap/bootstrap.py", line 31, in setup_script
            python,
          File "slapos.buildout/src/zc/buildout/easy_install.py", line 1313, in scripts
            sname = os.path.join(dest, sname)
          File "python3/lib/python3.6/posixpath.py", line 80, in join
            a = os.fspath(a)
        TypeError: expected str, bytes or os.PathLike object, not NoneType
    
    Change the parameters to respect the original signature.
    de5e5d50
bootstrap.py 2.04 KB