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

feat(whl_library): generate platform-specific dependency closures #1593

Merged
merged 20 commits into from
Dec 13, 2023

Commits on Dec 11, 2023

  1. Configuration menu
    Copy the full SHA
    17ac24e View commit details
    Browse the repository at this point in the history
  2. internal: render.dict and render.select supports value_repr

    This is to ensure that we can represent select of lists in a better way
    aignas committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    422f9df View commit details
    Browse the repository at this point in the history
  3. feat(pip_parse): generate target platform specific dependencies

    Before this change, the dependency closures would be influenced by the
    host-python interpreter, this removes the influence by detecting the
    platforms against which the `Requires-Dist` wheel metadata is evaluated.
    This functionality can be enabled via `target_platforms` attribute to
    the `pip.parse` extension and is showcased in the `bzlmod` example. The
    same attribute is also supported on the legacy `pip_parse` repository
    rule.
    
    The detection works in the following way:
    - Check if the python wheel is platform specific or cross-platform
      (i.e., ends with `any.whl`), if it is then platform-specific
      dependencies are generated, which will go through a `select`
      statement.
    - If it is platform specific, then parse the platform_tag and evaluate
      the `Requires-Dist` markers assuming the target platform rather than
      the host platform.
    
    NOTE: The `whl` `METADATA` is now being parsed using the `packaging`
    Python package instead of `pkg_resources` from `setuptools`.
    
    Fixes bazelbuild#1591
    aignas committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    38b3dfe View commit details
    Browse the repository at this point in the history
  4. fixup: remove TODO

    aignas committed Dec 11, 2023
    Configuration menu
    Copy the full SHA
    a1410f3 View commit details
    Browse the repository at this point in the history

Commits on Dec 12, 2023

  1. Apply suggestions from code review

    Co-authored-by: Richard Levasseur <richardlev@gmail.com>
    aignas and rickeylev authored Dec 12, 2023
    Configuration menu
    Copy the full SHA
    1f8bea2 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    69027d4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9776120 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    b198336 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0ef4159 View commit details
    Browse the repository at this point in the history
  6. Add more docs

    aignas committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    e19a38a View commit details
    Browse the repository at this point in the history
  7. finish addressing comments

    aignas committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    9200828 View commit details
    Browse the repository at this point in the history
  8. fixup windows tests

    aignas committed Dec 12, 2023
    Configuration menu
    Copy the full SHA
    6cb99c1 View commit details
    Browse the repository at this point in the history

Commits on Dec 13, 2023

  1. fixup Windows tests

    aignas committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    77f504d View commit details
    Browse the repository at this point in the history
  2. fixup the type annotations

    aignas committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    275a321 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    e913a0e View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7014c3c View commit details
    Browse the repository at this point in the history
  5. comment: use set.update

    aignas committed Dec 13, 2023
    Configuration menu
    Copy the full SHA
    6b24956 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    8481d0e View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    efd55e2 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    40ccabf View commit details
    Browse the repository at this point in the history