Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
S slapos.buildout
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 9
    • Merge requests 9
  • Operations
    • Operations
    • Incidents
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • nexedi
  • slapos.buildout
  • Merge requests
  • !32

Merged
Created May 29, 2024 by Xavier Thompson@xavier_thompsonOwner

zc.buildout 3.0.1+slapos003: Fix newly discovered bugs

  • Overview 16
  • Commits 17
  • Changes 9

These are fixes for issues that were discovered after !30 (merged) and during !31 (merged). They are included in a separate MR from !31 (merged) because they diverge from the original aim of !31 (merged) and in order not to hold up !31 (merged).

Like in !31 (merged), it seems judicious to rewrite history since 3.0.1 to immediately apply fixups and reorder commits in a way that presents our patches over 3.0.1 cohesively, instead of leaving this as work for later rebases or merging upstream, that will accumulate and makes such rebases harder. This rewrite has already been done in parallel branch rebase/fix-develop-build-artifacts, which has the exact same working tree but a rewritten history since 3.0.1.

  • Fix zc.recipe.egg:develop and :custom reinstalls: (1) Make the egg be properly reinstalled when versions of setup-eggs change and (2) make later runs of develop actually reinstall by switching to pip install --editable. This also enables zc.recipe.egg:develop for projects that only use pyproject.toml.

  • Make zc.recipe.egg:develop reinstall if .egg-info / .dist-info in package folder is removed: zc.recipe.egg:develop not only creates a package-name.egg-link in ./develop-eggs, it also generates a .egg-info or a .dist-info directly in the package folder referenced by the .egg-link. That's what lets setuptools detect that the egg is already installed, so removing it breaks the develop install.

  • Enable zc.recipe.egg:custom with projects that only use pyproject.toml: Let zc.buildout.easy_install.build discover pyproject.toml in source tree in addition to setup.py.

  • Fix setuptools.package_index usage after PEP 625: An egg called dot.separated.name will now yield a source distribution dot_separated_name-xxx.tar.gz, which when uploaded on PyPI or another index may result in setuptools.package_index finding a distribution for dot-separate-name (after normalization of dot_separated_name to a canonical form), leading buildout to fail to find a distribution for dot.separated.name.

  • Fix .pydistutils.cfg file and containing temporary $HOME folder leaking after buildout run: the temporary $HOME folder was created at module level and cleaned with atexit, but (1) slapos.rebootstrap calls os.execve, leading to resources from the original process never being cleaned up and (2) some promises may import zc.buildout.easy_install, triggering temporary $HOME and .pydistutils.cfg creation, and be killed without opportunity of cleanup if they timeout. So instead temporary $HOME and .pydistutils.cfg are created at each pip invocation.

Edited Jul 18, 2024 by Xavier Thompson
Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: dev/fix-develop-build-artifacts
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7