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(py_console_script_binary)!: entry points with custom dependencies #1363

Merged
merged 86 commits into from
Aug 25, 2023

Commits on Aug 23, 2023

  1. feat! add entry_point macro to rules_python

    Introduce a new `entry_point` macro to `rules_python` as opposed to the
    `hub` repository which allows users to generate an `entry_point` script
    for a given package. This will check the `console_scripts` key in the
    `entry_points.txt` dist-info file and avoids eager fetching of third
    party repositories because it is a `genrule` and a `py_binary`
    underneath the hood and exists in `rules_python`.
    
    This is a breaking change for bzlmod users as they will have to start
    using `@rules_python//python:entry_point.bzl`. For others this new macro
    is available to be used, but the old code is still present.
    
    Fixes bazelbuild#1362
    Fixes bazelbuild#543
    Fixes bazelbuild#979
    Fixes bazelbuild#1262
    Closes bazelbuild#980
    Closes bazelbuild#1294
    aignas committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    b4ff67b View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    20263bb View commit details
    Browse the repository at this point in the history
  3. fixup tests

    aignas committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    e0e64fe View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c7bb137 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    76fedaf View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    85d9bab View commit details
    Browse the repository at this point in the history
  7. fixup: add transitions

    aignas committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    72d7ad5 View commit details
    Browse the repository at this point in the history
  8. doc: Update docs with examples

    aignas committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    4a6ce9e View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    f976b4a View commit details
    Browse the repository at this point in the history
  10. comment: disallow main

    aignas committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    2463ad0 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    b77ef08 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    cf2f481 View commit details
    Browse the repository at this point in the history
  13. fixup rename

    aignas committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    1d20bd8 View commit details
    Browse the repository at this point in the history
  14. comment: change the macro name

    aignas committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    6d320fe View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    0f979f5 View commit details
    Browse the repository at this point in the history
  16. comment: revert the inference of the script name because the pkg labe…

    …ls are normalized and may be different than the script names
    aignas committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    8ada8f9 View commit details
    Browse the repository at this point in the history
  17. chore: update docs

    aignas committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    32ff458 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    a04f6b5 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    026281f View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    04f715a View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    054f93a View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    82e756a View commit details
    Browse the repository at this point in the history
  23. chore: remove a TODO note

    aignas committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    e09e72c View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    470acbe View commit details
    Browse the repository at this point in the history
  25. Configuration menu
    Copy the full SHA
    b82178a View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    0330ca7 View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    a1a05dd View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    8a18304 View commit details
    Browse the repository at this point in the history
  29. Configuration menu
    Copy the full SHA
    d60abf8 View commit details
    Browse the repository at this point in the history
  30. comment: remove shebang as it is not used

    This should stop confusing people about what shebang/interpreter is used.
    
    Fixes bazelbuild#1055
    aignas committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    cdf8903 View commit details
    Browse the repository at this point in the history
  31. comment: use py_binary for entry_point generation tool

    This is going to be more correct and simplifies visibility exports
    aignas committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    8b92e29 View commit details
    Browse the repository at this point in the history
  32. Configuration menu
    Copy the full SHA
    5c0431b View commit details
    Browse the repository at this point in the history
  33. Configuration menu
    Copy the full SHA
    39a57a4 View commit details
    Browse the repository at this point in the history
  34. Configuration menu
    Copy the full SHA
    59e9b1d View commit details
    Browse the repository at this point in the history
  35. Configuration menu
    Copy the full SHA
    861a8fd View commit details
    Browse the repository at this point in the history
  36. Configuration menu
    Copy the full SHA
    9d48df0 View commit details
    Browse the repository at this point in the history
  37. Configuration menu
    Copy the full SHA
    45149df View commit details
    Browse the repository at this point in the history
  38. revert: "migrate twine_publisher to py_console_script_binary"

    This reverts commit cda0d63.
    aignas committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    d204b2b View commit details
    Browse the repository at this point in the history
  39. comment: move things around

    aignas committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    db8f3ac View commit details
    Browse the repository at this point in the history
  40. Configuration menu
    Copy the full SHA
    df6660a View commit details
    Browse the repository at this point in the history
  41. Configuration menu
    Copy the full SHA
    ce157dc View commit details
    Browse the repository at this point in the history
  42. Configuration menu
    Copy the full SHA
    3d382d4 View commit details
    Browse the repository at this point in the history
  43. Simplify the second test

    aignas committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    b47848b View commit details
    Browse the repository at this point in the history
  44. Configuration menu
    Copy the full SHA
    4be2cac View commit details
    Browse the repository at this point in the history
  45. Configuration menu
    Copy the full SHA
    38d3cd3 View commit details
    Browse the repository at this point in the history
  46. Configuration menu
    Copy the full SHA
    d3b1c7f View commit details
    Browse the repository at this point in the history
  47. Configuration menu
    Copy the full SHA
    db1aa77 View commit details
    Browse the repository at this point in the history
  48. Configuration menu
    Copy the full SHA
    9939ba2 View commit details
    Browse the repository at this point in the history
  49. Add a note on map_each

    aignas committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    45b93c2 View commit details
    Browse the repository at this point in the history
  50. Configuration menu
    Copy the full SHA
    22a24ed View commit details
    Browse the repository at this point in the history
  51. chore: remove duplicated docs

    aignas committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    1883ad3 View commit details
    Browse the repository at this point in the history
  52. comment: clarify docs

    aignas committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    197f5de View commit details
    Browse the repository at this point in the history
  53. Configuration menu
    Copy the full SHA
    933643b View commit details
    Browse the repository at this point in the history
  54. Configuration menu
    Copy the full SHA
    841aab2 View commit details
    Browse the repository at this point in the history
  55. Configuration menu
    Copy the full SHA
    530a8f9 View commit details
    Browse the repository at this point in the history
  56. fix: add back the sys.path workaround and add clearer documentation a…

    …s to why it is needed.
    aignas committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    923c93d View commit details
    Browse the repository at this point in the history
  57. Configuration menu
    Copy the full SHA
    a9a3e62 View commit details
    Browse the repository at this point in the history
  58. fixup! fix: add back the sys.path workaround and add clearer document…

    …ation as to why it is needed.
    aignas committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    f5cfd7b View commit details
    Browse the repository at this point in the history
  59. Configuration menu
    Copy the full SHA
    5bca053 View commit details
    Browse the repository at this point in the history
  60. Configuration menu
    Copy the full SHA
    7dbf322 View commit details
    Browse the repository at this point in the history
  61. doc: clarify docs

    aignas committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    48b52ea View commit details
    Browse the repository at this point in the history
  62. chore: add a changelog entry

    aignas committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    0915a57 View commit details
    Browse the repository at this point in the history
  63. Configuration menu
    Copy the full SHA
    9e5d47d View commit details
    Browse the repository at this point in the history
  64. Configuration menu
    Copy the full SHA
    e40a9ad View commit details
    Browse the repository at this point in the history
  65. Configuration menu
    Copy the full SHA
    79e3732 View commit details
    Browse the repository at this point in the history
  66. bzlmod: rewrite the example for linting files with pylint

    Now we use 'bazel_skylib' 'run_binary' and 'write_file' to get the pylint report
    in hopes to make the usage of pylint more robust
    aignas committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    c06096c View commit details
    Browse the repository at this point in the history
  67. Configuration menu
    Copy the full SHA
    1fc498a View commit details
    Browse the repository at this point in the history
  68. docs: improve docs

    aignas committed Aug 23, 2023
    Configuration menu
    Copy the full SHA
    e23cca6 View commit details
    Browse the repository at this point in the history
  69. Configuration menu
    Copy the full SHA
    b7d3895 View commit details
    Browse the repository at this point in the history
  70. Configuration menu
    Copy the full SHA
    c153693 View commit details
    Browse the repository at this point in the history

Commits on Aug 24, 2023

  1. Configuration menu
    Copy the full SHA
    b9db878 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3020e21 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b0aa698 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    606e08b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    87a9e07 View commit details
    Browse the repository at this point in the history
  6. comment: improve the CHANGELOG

    aignas committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    e76b286 View commit details
    Browse the repository at this point in the history
  7. comment: improve progress_message

    Co-authored-by: Richard Levasseur <richardlev@gmail.com>
    aignas and rickeylev committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    7851fbb View commit details
    Browse the repository at this point in the history
  8. comment: improve internal docstring

    Co-authored-by: Richard Levasseur <richardlev@gmail.com>
    aignas and rickeylev committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    f43df6c View commit details
    Browse the repository at this point in the history
  9. comment: improve a replacement suggestion for bzlmod users

    Co-authored-by: Richard Levasseur <richardlev@gmail.com>
    aignas and rickeylev committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    c978708 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    8f9eb1e View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    ed0e82e View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    924a8dd View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    3480c12 View commit details
    Browse the repository at this point in the history
  14. fixup tests

    aignas committed Aug 24, 2023
    Configuration menu
    Copy the full SHA
    ff8d1f4 View commit details
    Browse the repository at this point in the history

Commits on Aug 25, 2023

  1. Update python/private/py_console_script_binary.bzl

    doc why str(pkg) is called on a seemingly already string value
    rickeylev committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    58f3c89 View commit details
    Browse the repository at this point in the history
  2. Update python/private/py_console_script_binary.bzl

    See if buildifier is happy with this...
    rickeylev committed Aug 25, 2023
    Configuration menu
    Copy the full SHA
    51cf7e5 View commit details
    Browse the repository at this point in the history