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

Merge PEP 660 implementation into main #3488

Merged
merged 145 commits into from Aug 11, 2022
Merged

Merge PEP 660 implementation into main #3488

merged 145 commits into from Aug 11, 2022

Commits on Feb 4, 2022

  1. Copy the full SHA
    be3778e View commit details
    Browse the repository at this point in the history

Commits on Apr 22, 2022

  1. Copy the full SHA
    2bddfdf View commit details
    Browse the repository at this point in the history

Commits on Jun 15, 2022

  1. Copy the full SHA
    c6106b7 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    ad803ae View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    e36951e View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    e55e51d View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    1afb6c0 View commit details
    Browse the repository at this point in the history
  6. Copy the full SHA
    0e6870b View commit details
    Browse the repository at this point in the history
  7. Copy the full SHA
    da6dd05 View commit details
    Browse the repository at this point in the history
  8. Copy the full SHA
    e7123c6 View commit details
    Browse the repository at this point in the history
  9. Copy the full SHA
    821d664 View commit details
    Browse the repository at this point in the history
  10. Editable rework dist_info to use --output-dir instead of --egg-base

    Changes:
    
    - Deprecate the --egg-base parameter for dist_info and add --output-dir as
      replacement
    
      (Since the egg format is mostly deprecated, it is nice to move away from
      this nomenclature...)
    abravalheri committed Jun 15, 2022
    Copy the full SHA
    c642529 View commit details
    Browse the repository at this point in the history
  11. Copy the full SHA
    5bb97d0 View commit details
    Browse the repository at this point in the history
  12. Copy the full SHA
    3e9f441 View commit details
    Browse the repository at this point in the history
  13. Copy the full SHA
    5866b85 View commit details
    Browse the repository at this point in the history
  14. Copy the full SHA
    aee3245 View commit details
    Browse the repository at this point in the history
  15. Copy the full SHA
    33f2431 View commit details
    Browse the repository at this point in the history
  16. Copy the full SHA
    06fbc36 View commit details
    Browse the repository at this point in the history
  17. Rework PEP 660 PoC to re-use bdist_wheel

    Avoid using the editables dependency
      - The current implementation is using it to simply place .pth file
        pointing to the project directory anyway...
      - Adding a dependency for creating a file with a single line is a bit
        overkill.
    
    Avoid importing pkg_resources directly
    - Setuptools wants to move away from pkg_resources
    
    Replace custom wheel build with re-use of bdist_wheel
      - pro: avoid re-implementing the archiving logic and make sure it is
        compatible with the same archive format used by the final wheels.
      - con: the API of wheel is not exactly stable or exported as public.
    abravalheri committed Jun 15, 2022
    Copy the full SHA
    0bf1d4c View commit details
    Browse the repository at this point in the history
  18. Copy the full SHA
    7b402eb View commit details
    Browse the repository at this point in the history
  19. Remove unused function

    abravalheri committed Jun 15, 2022
    Copy the full SHA
    a31df2e View commit details
    Browse the repository at this point in the history
  20. Copy the full SHA
    7ae5a69 View commit details
    Browse the repository at this point in the history
  21. Handle namespace_packages in editable_wheel

    This change is heavily inspired by the existing develop command
    
    - Use namespaces.Installer to ensure legacy namespaces are handled.
    abravalheri committed Jun 15, 2022
    Copy the full SHA
    a13adc8 View commit details
    Browse the repository at this point in the history
  22. Copy the full SHA
    14eb855 View commit details
    Browse the repository at this point in the history
  23. Add namespace test

    abravalheri committed Jun 15, 2022
    Copy the full SHA
    8cb1344 View commit details
    Browse the repository at this point in the history
  24. Add initial implementation of editable strategy based on .pth file

    - Improve the skeleton that would allow the separation between different
      editable strategies
    - Extract strategy for static .pth files
    - Recognise the static .pth file as the primary strategy for src-layout
      packages in a "non"-strict scenario
    abravalheri committed Jun 15, 2022
    Copy the full SHA
    f997500 View commit details
    Browse the repository at this point in the history
  25. Copy the full SHA
    73c65b2 View commit details
    Browse the repository at this point in the history
  26. Copy the full SHA
    59a39d9 View commit details
    Browse the repository at this point in the history
  27. Add tests for editable install focusing on namespaces

    - Move test_editable_prefix from test_develop to test_editable_install
    - Add more tests for editable install focusing on packages using
      namespaces (legacy or PEP 420)
    abravalheri committed Jun 15, 2022
    Copy the full SHA
    a27b96b View commit details
    Browse the repository at this point in the history
  28. Copy the full SHA
    1a531db View commit details
    Browse the repository at this point in the history
  29. Copy the full SHA
    dd9886c View commit details
    Browse the repository at this point in the history
  30. Copy the full SHA
    f210f16 View commit details
    Browse the repository at this point in the history
  31. Copy the full SHA
    994ca21 View commit details
    Browse the repository at this point in the history
  32. Copy the full SHA
    fba8717 View commit details
    Browse the repository at this point in the history
  33. Copy the full SHA
    3ba7ec4 View commit details
    Browse the repository at this point in the history
  34. Fix error with Python 3.7

    abravalheri committed Jun 15, 2022
    Copy the full SHA
    01ceef6 View commit details
    Browse the repository at this point in the history
  35. Copy the full SHA
    55260a7 View commit details
    Browse the repository at this point in the history
  36. Copy the full SHA
    730b6e7 View commit details
    Browse the repository at this point in the history
  37. Copy the full SHA
    50afbf4 View commit details
    Browse the repository at this point in the history
  38. Copy the full SHA
    40f2f0f View commit details
    Browse the repository at this point in the history
  39. Initial editable MetaPathFinder for top-level pkgs

    - Add improvements and small fixes for the static .pth file strategy
    - Add initial implementation of an editable strategy based on
      MetaPathFinder but just for the top-level packages/modules
      - The idea here is to create a "loose/lax" mechanism that is able to
        handle the complex mapping mechanisms supported by setuptools (via
        package_dir) while still allowing new modules and files to be added to
        existing packages.
    abravalheri committed Jun 15, 2022
    Copy the full SHA
    f5643f5 View commit details
    Browse the repository at this point in the history
  40. Copy the full SHA
    4112379 View commit details
    Browse the repository at this point in the history
  41. Add temporary workaround for packages.find.exclude

    This workaround can be reverted when issue 3261 is fixed.
    abravalheri committed Jun 15, 2022
    Copy the full SHA
    008a718 View commit details
    Browse the repository at this point in the history
  42. Copy the full SHA
    f3786f3 View commit details
    Browse the repository at this point in the history
  43. Copy the full SHA
    06d52fe View commit details
    Browse the repository at this point in the history
  44. Ignore transient warning

    abravalheri committed Jun 15, 2022
    Copy the full SHA
    9dc2588 View commit details
    Browse the repository at this point in the history
  45. Copy the full SHA
    92c90db View commit details
    Browse the repository at this point in the history
  46. Copy the full SHA
    a4e16fe View commit details
    Browse the repository at this point in the history
  47. Copy the full SHA
    99cf706 View commit details
    Browse the repository at this point in the history
  48. Copy the full SHA
    3c71c87 View commit details
    Browse the repository at this point in the history
  49. Add editable strategy based on a link tree

    - Add implementation of editable strategy based on a link tree
      - This is the `strict` implementation.
      - Only files are linked, not directories.
        - This approach makes it possible to use harlinks when softlinks are not
          available (e.g. Windows)
        - It also guarantees files that would not be part of the final wheel are
          not available in the editable install.
    - Add non-editable files to the produced wheel wheel (e.g. `headers`,
      `scripts`, `data`)
    abravalheri committed Jun 15, 2022
    Copy the full SHA
    d9c4a41 View commit details
    Browse the repository at this point in the history
  50. Copy the full SHA
    2ca60ad View commit details
    Browse the repository at this point in the history
  51. Copy the full SHA
    501aec9 View commit details
    Browse the repository at this point in the history
  52. Copy the full SHA
    4687243 View commit details
    Browse the repository at this point in the history
  53. Ensure namespaces from ImportFinder handle additions to path

    According to the PEP 420, namespace packages need to gracefully handle
    later additions to path.
    
    - Use a `PathEntryFinder` + an arbitrary placeholder entry on `sys.path`
      to force `PathFinder` to create a namespace spec.
      - Since `_NamespacePath` and `_NamespaceLoader` are private classes (or
        just documented for comparison purposes), there is no other way to
        implement this behaviour directly [^1].
    
    [^1]: Reimplementing _NamespacePath + a custom logic to maintain
          namespace portions don't have a corresponding path entry also
          seems to have the same end result.
    abravalheri committed Jun 15, 2022
    Copy the full SHA
    daaf3ab View commit details
    Browse the repository at this point in the history
  54. Copy the full SHA
    ebf8369 View commit details
    Browse the repository at this point in the history

Commits on Jun 16, 2022

  1. Copy the full SHA
    6f680c9 View commit details
    Browse the repository at this point in the history
  2. Make the dist info args translation private

    It requires changes in other parts of the build system/commands to be
    able to be used.
    abravalheri committed Jun 16, 2022
    Copy the full SHA
    da33c52 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    26f38a2 View commit details
    Browse the repository at this point in the history
  4. Support --build-option alongside --global-option

    `--build-option` should be used as a escape hatch to pass command
    specific options, while `--global-option` can be used to pass flags like
    `--quiet` or `--verbose`.
    abravalheri committed Jun 16, 2022
    Copy the full SHA
    c338f92 View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    4092e3b View commit details
    Browse the repository at this point in the history
  6. Copy the full SHA
    46c1636 View commit details
    Browse the repository at this point in the history
  7. Copy the full SHA
    df44192 View commit details
    Browse the repository at this point in the history
  8. Copy the full SHA
    01d961a View commit details
    Browse the repository at this point in the history
  9. Add news fragment

    abravalheri committed Jun 16, 2022
    Copy the full SHA
    57c863a View commit details
    Browse the repository at this point in the history
  10. Copy the full SHA
    8db675d View commit details
    Browse the repository at this point in the history

Commits on Jun 17, 2022

  1. Copy the full SHA
    a19c4df View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    66538d8 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    ecdeb22 View commit details
    Browse the repository at this point in the history

Commits on Jun 18, 2022

  1. Copy the full SHA
    84d5133 View commit details
    Browse the repository at this point in the history

Commits on Jun 19, 2022

  1. Copy the full SHA
    207da8c View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    075a3c8 View commit details
    Browse the repository at this point in the history
  3. Add news fragment

    abravalheri committed Jun 19, 2022
    Copy the full SHA
    2be4465 View commit details
    Browse the repository at this point in the history
  4. Remove debugging code

    abravalheri committed Jun 19, 2022
    Copy the full SHA
    64fdf11 View commit details
    Browse the repository at this point in the history

Commits on Jun 20, 2022

  1. Fix linting errors

    abravalheri committed Jun 20, 2022
    Copy the full SHA
    d019f49 View commit details
    Browse the repository at this point in the history

Commits on Jun 21, 2022

  1. Copy the full SHA
    cdd12f3 View commit details
    Browse the repository at this point in the history
  2. Allow dist-info to keep original egg-info directory

    During a PEP 517 build, this directory can later be passed to
    ``build_py`` via the ``existing_egg_info_dir attribute``
    (which in turn avoids re-running ``egg_info`` to create a manifest).
    abravalheri committed Jun 21, 2022
    Copy the full SHA
    fd891af View commit details
    Browse the repository at this point in the history
  3. build_meta: Allow dist-info and egg-info to coexist

    PEP 517 does not care if other directories/files are left behind in the
    `metadata_directory`, as long as a `.dist_info` directory is produced at
    the root. We can leave the `.egg-info` directory behind, so this way
    we don't have to run it again when listing files from `build_py`.
    abravalheri committed Jun 21, 2022
    Copy the full SHA
    fd5fcbb View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    90c3149 View commit details
    Browse the repository at this point in the history

Commits on Jun 24, 2022

  1. Copy the full SHA
    bd48c63 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    8832db2 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    f2da32f View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    7a9bc76 View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    5b7498b View commit details
    Browse the repository at this point in the history
  6. Copy the full SHA
    5f231b9 View commit details
    Browse the repository at this point in the history
  7. Copy the full SHA
    a376bf9 View commit details
    Browse the repository at this point in the history
  8. Copy the full SHA
    fdd9ab3 View commit details
    Browse the repository at this point in the history
  9. Copy the full SHA
    965458d View commit details
    Browse the repository at this point in the history

Commits on Jun 25, 2022

  1. Copy the full SHA
    28f6f36 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    700237e View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    c675d78 View commit details
    Browse the repository at this point in the history
  4. Add news fragment

    abravalheri committed Jun 25, 2022
    Copy the full SHA
    5479513 View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    2ee94e7 View commit details
    Browse the repository at this point in the history
  6. Test symlinks in the target directory

    Improve chances that symlinks are tested directly on the relevant file
    system (some machines might have multiple disks with different link
    support).
    abravalheri committed Jun 25, 2022
    Copy the full SHA
    0a82048 View commit details
    Browse the repository at this point in the history
  7. Copy the full SHA
    2a9b06f View commit details
    Browse the repository at this point in the history
  8. Copy the full SHA
    1648318 View commit details
    Browse the repository at this point in the history
  9. Copy the full SHA
    a3e8d4d View commit details
    Browse the repository at this point in the history
  10. Add news fragment

    abravalheri committed Jun 25, 2022
    Copy the full SHA
    6362056 View commit details
    Browse the repository at this point in the history
  11. Copy the full SHA
    d5b5f6b View commit details
    Browse the repository at this point in the history
  12. Add interfaces to docs

    abravalheri committed Jun 25, 2022
    Copy the full SHA
    17311b1 View commit details
    Browse the repository at this point in the history

Commits on Jun 27, 2022

  1. Copy the full SHA
    54935d6 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    e7f351b View commit details
    Browse the repository at this point in the history
  3. Fix header location

    abravalheri committed Jun 27, 2022
    Copy the full SHA
    8bf3658 View commit details
    Browse the repository at this point in the history

Commits on Jun 29, 2022

  1. Copy the full SHA
    85303e8 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    f3796a6 View commit details
    Browse the repository at this point in the history

Commits on Jul 3, 2022

  1. Copy the full SHA
    156a75f View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    9d72045 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    b422ddc View commit details
    Browse the repository at this point in the history

Commits on Jul 4, 2022

  1. Copy the full SHA
    233c986 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    618f4ef View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    2022949 View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    49e2152 View commit details
    Browse the repository at this point in the history

Commits on Jul 21, 2022

  1. Copy the full SHA
    d0d8b63 View commit details
    Browse the repository at this point in the history

Commits on Aug 2, 2022

  1. Copy the full SHA
    ab8e033 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    2b7c44f View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    5e50139 View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    f4d411c View commit details
    Browse the repository at this point in the history
  5. Use venv to isolate test_legacy_editable_install

    This is a test fix to prevent this test case for breaking test
    isolation.
    abravalheri committed Aug 2, 2022
    Copy the full SHA
    38cf2d0 View commit details
    Browse the repository at this point in the history
  6. Copy the full SHA
    a703ff8 View commit details
    Browse the repository at this point in the history
  7. Copy the full SHA
    7b2402a View commit details
    Browse the repository at this point in the history

Commits on Aug 3, 2022

  1. Copy the full SHA
    4b8a6e0 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    0d3cf53 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    0ca171c View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    fbd2530 View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    1d9ac32 View commit details
    Browse the repository at this point in the history
  6. Copy the full SHA
    80311ab View commit details
    Browse the repository at this point in the history
  7. Add compat mode to editable install

    This is only a transitional measure that can be temporarily used by
    users to help them to adapt to the PEP 660 implementation.
    
    In this commit the argument for the `editable_wheel` command is changed
    from the flag form `--strict` to `--mode=strict`.
    abravalheri committed Aug 3, 2022
    Copy the full SHA
    da5af04 View commit details
    Browse the repository at this point in the history
  8. Copy the full SHA
    9e99099 View commit details
    Browse the repository at this point in the history
  9. Make editable mode nomenclature homogeneous

    The terms being used are: lenient, strict and compat.
    abravalheri committed Aug 3, 2022
    Copy the full SHA
    266c38d View commit details
    Browse the repository at this point in the history
  10. Copy the full SHA
    d57e68b View commit details
    Browse the repository at this point in the history
  11. Copy the full SHA
    498fb5c View commit details
    Browse the repository at this point in the history
  12. Copy the full SHA
    eb363c3 View commit details
    Browse the repository at this point in the history
  13. Copy the full SHA
    4f4c6ac View commit details
    Browse the repository at this point in the history
  14. Add news fragment

    abravalheri committed Aug 3, 2022
    Copy the full SHA
    f3e11d7 View commit details
    Browse the repository at this point in the history

Commits on Aug 4, 2022

  1. Copy the full SHA
    4c2611b View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    da4249d View commit details
    Browse the repository at this point in the history
  3. Add transitional compat editable install (#3484)

    Add a temporary compat mode that will try (best effort) to emulate the
    same "static .pth" file produced by python setup.py develop.
    
    This was originally suggested in
    https://discuss.python.org/t/help-testing-pep-660-support-in-setuptools/16904
    abravalheri committed Aug 4, 2022
    Copy the full SHA
    2f06393 View commit details
    Browse the repository at this point in the history
  4. Update docs on the development_mode page (#3485)

    Mention:
    
    - compat mode
    - limitations in terms of accessing files outside of the package
      directory.
    - limitations in terms of __file__ and __path__ exact values.
      implementation mechanisms
    abravalheri committed Aug 4, 2022
    Copy the full SHA
    90c29d9 View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    3f49880 View commit details
    Browse the repository at this point in the history

Commits on Aug 5, 2022

  1. Copy the full SHA
    4a37623 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    b0b9420 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    ccca622 View commit details
    Browse the repository at this point in the history

Commits on Aug 6, 2022

  1. Copy the full SHA
    5aa389c View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    228f3e9 View commit details
    Browse the repository at this point in the history

Commits on Aug 8, 2022

  1. Copy the full SHA
    707f953 View commit details
    Browse the repository at this point in the history