1. 20 May, 2024 36 commits
  2. 17 May, 2024 4 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