Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 1461: Better loop breaker for manifest_maker #2844

Merged
merged 7 commits into from
Nov 3, 2021

Commits on Nov 1, 2021

  1. Fix 1461: Better loop breaker for manifest_maker

    The inconsistency for the `package_data` configuration in sdists
    when `include_package_data=True` in pypa#1461 have been causing some
    problems for the community for a while, as also shown in pypa#2835.
    
    As pointed out by
    [@jaraco](pypa#1461 (comment)),
    this was being caused by a mechanism to break the recursion between the
    `egg_info` and `sdist` commands.
    
    In summary the loop is caused by the following behaviour:
    
    - the `egg_info` command uses a subclass of `sdist` (`manifest_maker`)
      to calculate the MANIFEST,
    - the `sdist` class needs to know the MANIFEST to calculate the data files when
      `include_package_data=True`
    
    Previously, the mechanism to break this loop was to simply ignore
    the data files in `sdist` when `include_package_data=True`.
    
    The approach implemented in this change was to replace this mechanism,
    by allowing `manifest_maker` to override the `_safe_data_files` method
    from `sdist`.
    
    ---
    
    Please notice [an extensive experiment]
    (https://github.com/abravalheri/experiment-setuptools-package-data)
    was carried out to investigate the previous confusing behaviour.
    
    There is also [a simplified theoretical analysis]
    (pyscaffold/pyscaffold#535 (comment))
    comparing the observed behavior in the experiment and the expected
    one. This analysis point out to the same offender indicated by
    [@jaraco](pypa#1461 (comment))
    (which is being replaced in this change).
    abravalheri committed Nov 1, 2021
    1 Configuration menu
    Copy the full SHA
    2e66eb7 View commit details
    Browse the repository at this point in the history

Commits on Nov 3, 2021

  1. Configuration menu
    Copy the full SHA
    a228068 View commit details
    Browse the repository at this point in the history
  2. Add build_py and sdist to bootstrap metadata. Ensures distutils versi…

    …ons aren't used while bootstrapping egg-info.
    jaraco committed Nov 3, 2021
    Configuration menu
    Copy the full SHA
    0ea58d0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2d38be3 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b8ad7d2 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    10ead90 View commit details
    Browse the repository at this point in the history
  6. Merge with failing test

    jaraco committed Nov 3, 2021
    Configuration menu
    Copy the full SHA
    6757e38 View commit details
    Browse the repository at this point in the history