Skip to content

Conversation

@cognifloyd
Copy link
Member

Background

This is another part of introducing pants, as discussed in various TSC meetings.

Related PRs can be found in:

Overview of this PR

This configures pants and generates a lockfile so it can use setuptools when running the package goal, which includes building wheels.

We will still need more config before we can use pants to build wheels, but this is a prerequisite for that. To build wheels, we also need to add metadata to BUILD files. To simplify the metadata that has to be repeated for each wheel future PRs will include at least: a pants macro and a pants plugin.

Here is the pants.toml config this PR adds:

st2/pants.toml

Lines 150 to 153 in ec46508

[setuptools]
# setuptools 59.7 (at least) does not support python 3.6
version = "setuptools>=50.3.0,<59.0"
lockfile = "lockfiles/setuptools.lock"

Note: Many other resolves also include setuptools. This resolve is for when pants has to call setuptools directly, not for when it is used indirectly.

setuptools version

I added a range of versions that we can use. I tried using newer versions, but they didn't work with python 3.6, so I capped that.

lockfiles/setuptools.lock

At 120 lines this is the smallest lockfile we have.

@cognifloyd cognifloyd added this to the pants milestone Dec 7, 2022
@cognifloyd cognifloyd requested review from a team, amanda11, arm4b, nzlosh, rush-skills and winem December 7, 2022 14:22
@cognifloyd cognifloyd self-assigned this Dec 7, 2022
@pull-request-size pull-request-size bot added the size/L PR that changes 100-499 lines. Requires some effort to review. label Dec 7, 2022
Copy link
Contributor

@amanda11 amanda11 left a comment

Choose a reason for hiding this comment

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

LGTM

@cognifloyd cognifloyd merged commit fedd15f into master Dec 8, 2022
@cognifloyd cognifloyd deleted the pants-setuptools branch December 8, 2022 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external dependency pantsbuild size/L PR that changes 100-499 lines. Requires some effort to review. st2-packages

5 participants