1. 20 May, 2024 30 commits
  2. 17 May, 2024 10 commits
    • Xavier Thompson's avatar
      [feat] Use pip wheel + Wheel.install_as_egg · b08cf932
      Xavier Thompson authored
      `pip install <package>` produces a `<package-name>` package folder
      and a `<package-name>.dist-info` metadata folder, which is another
      format than eggs. Then buildout bundles both folders into a parent
      folder `<package.egg>` and tries to act as though it were an egg.
      
      Instead, use `pip wheel` to produce a wheel - which `pip install`
      does internally anyway - and `setuptools.Wheel.install_as_egg` to
      produce a genuine egg.
      
      This is much cleaner: it consistently produces genuine eggs instead
      of sometimes true eggs, sometimes `.dist-info` bundles depending on
      whether `pip install` is called or the package was installed from a
      `.whl` or `.egg` archive directly.
      
      The only downside it this requires setuptools >= 38.2.3.
      b08cf932
    • Xavier Thompson's avatar
      [fix] Add each .egg and .dist-info to environment · 58b8ec8d
      Xavier Thompson authored
      Since zc.buildout uses `pip` to install dists, most .egg in ./eggs and
      ./develop-eggs (in case of dists installed with zc.recipe.egg:custom)
      are not actually eggs, but installed wheels with .dist-info format
      which have been bundled into a .egg containing .dist-info metadata
      folder as well as the actual package folder directly alongside.
      
      Unlike actual eggs, such */*.dist-info bundles are not stepped into
      by package_resources when the containing directory is add to the
      environment, so each .egg bundle needs to be added individually.
      
      Buildout already does this for bundles in the target directory of
      egg installation, usually ./eggs, but e.g. in offline mode there
      is no target directory and then already installed .egg bundles
      are not detected.
      
      So now every dist path is added to the environment individual,
      including for paths where buildout looks for already installed
      eggs but will not install eggs to, such as ./develop-eggs, and
      also ./eggs in offline mode or when using zc.recipe.egg:custom
      and the target is ./develop-eggs and ./eggs is such a scan-from
      but don't-install-to path.
      58b8ec8d
    • Xavier Thompson's avatar
      bfedbc34
    • Xavier Thompson's avatar
      9f45ce37
    • Julien Muchembled's avatar
      [feat] Omit Python library in script paths · 134008a5
      Julien Muchembled authored
      This is useful when using OS Python & eggs.
      
      Useless for SlapOS.
      134008a5
    • Xavier Thompson's avatar
      77ca6153
    • Xavier Thompson's avatar
      [doc] Show getting-started with modern python venv · 19f6addd
      Xavier Thompson authored
      Also show `pip install <url-for-tar.gz-of-master-branch-on-gitlab>`.
      19f6addd
    • Xavier Thompson's avatar
      [fix] Allow only installable DEVELOP_DIST in index · 85619ff1
      Xavier Thompson authored
      The package index considers may yield develop dists found on its local
      search_path - sys.path by default - in addition to its index_url.
      
      This commit discards such dists when they do not contain a setup.py
      nor a pyproject.toml, as a good heuristic of whether they will be
      installable or not.
      85619ff1
    • Xavier Thompson's avatar
      [fix] Fix package index selection indexing · 07a270fd
      Xavier Thompson authored
      Index constructed package indexes by all their parameters.
      07a270fd
    • Xavier Thompson's avatar
      [feat] Add buildout:extra-paths option · 1f3977f8
      Xavier Thompson authored
      This option determines what paths zc.buildout will scan for already
      installed distributions. It can be set to an empty value to enable
      isolation. The special values 'sys.path', 'legacy' and 'zc.buildout'
      expand to particular paths. The default is 'zc.buildout'.
      
      The 'sys.path' mode simply expands to the currrent sys.path.
      
      The 'legacy' mode reproduces the previous behavior of specifically
      scanning the paths of the current zc.buildout distribution and its
      dependencies using a weird ordering logic that bears no relation to the
      order they appear in sys.path - which can produce unexpected results as
      other distributions for zc.buildout, pip, wheel and setuptools may take
      precedence over the ones currently running.
      
      The 'zc.buildout' mode is similar to 'legacy' as it uses only the paths
      of the currently running zc.buildout and dependencies, but unlike
      'legacy' mode it respects the order in which these appear in sys.path,
      avoiding unexpected results.
      
      This mode is set to the default because it is closest to 'legacy' mode
      and because it has a nice property: running in succession
      
        `buildout buildout:extra-paths= bootstrap` (1)
        `bin/buildout` (2)
      
      will result in (1) installing zc.buildout and its dependencies in
      ./eggs in isolation from the environment, and (2) using only the
      paths of these in ./eggs, i.e. continuing to operate in isolation,
      even without setting extra-paths explictly.
      1f3977f8