Skip to main content
Version: 2.9 (deprecated)

pants_requirements


Generate python_requirement targets for Pants itself to use with Pants plugins.

This is useful when writing plugins so that you can build and test your plugin using Pants. The generated targets will have the correct version based on the version in your pants.toml, and they will work with dependency inference.

Because the Plugin API is not yet stable, the version is set automatically for you to improve stability. If you're currently using a dev release, the version will be set to that exact dev release. If you're using a release candidate (rc) or stable release, the version will allow any non-dev-release release within the release series, e.g. >=2.9.0rc0,<2.10.

(If this versioning scheme does not work for you, you can directly create python_requirement targets for pantsbuild.pants and pantsbuild.pants.testutil. We also invite you to share your ideas at https://github.com/pantsbuild/pants/issues/new/choose)

Backend: ``


description

str | None
default: None

A human-readable description of the target.

Use ./pants list --documented :: to see all targets with descriptions.

tags

Iterable[str] | None
default: None

Arbitrary strings to describe a target.

For example, you may tag some test targets with 'integration_test' so that you could run ./pants --tag='integration_test' test :: to only run on targets with that tag.

testutil

bool
default: True

If true, include pantsbuild.pants.testutil to write tests for your plugin.