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

Move/Rename: goals/setup_py.py -> {util_rules,goals}/package_dists.py + subsystems/setup_py_generation.py #18702

Merged
merged 1 commit into from
Apr 8, 2023

Conversation

cognifloyd
Copy link
Member

@cognifloyd cognifloyd commented Apr 7, 2023

In pants v1, there was a setup-py goal. In pants v2, that is now part of the more generic package goal. So, the name setup_py doesn't make sense any more.

Also, most of the rules in that file are used in contexts other than the package goal. For instance, I'm using them in #18639 in the export goal. And importing something from goals in util_rules feels rather odd. So, I would like to see most of these rules under util_rules.

This change does the following:

  • renames: pants.backends.python.goals.setup_py to pants.backends.python.util_rules.package_dists
  • adds a minimal: pants.backends.python.goals.package_dists
  • moves SetupPyGeneration(Subsystem) to pants.backends.python.subsystems.setup_py_generation
  • adjusts imports to use the new locations as needed.

@cognifloyd cognifloyd added category:plugin api change backend: Python Python backend-related issues labels Apr 7, 2023
@cognifloyd cognifloyd added this to the 2.17.x milestone Apr 7, 2023
@cognifloyd cognifloyd self-assigned this Apr 7, 2023
@cognifloyd cognifloyd marked this pull request as ready for review April 7, 2023 22:53
Copy link
Contributor

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good change! And thanks for keeping this focused on only moving files.

@cognifloyd cognifloyd merged commit 690e6a6 into pantsbuild:main Apr 8, 2023
@cognifloyd cognifloyd deleted the rename-setup_py branch June 14, 2023 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants