Skip to main content

In-Workspace Execution in Pants v2.23.x

· 6 min read
Pants Maintainer

Photo by Getty Images on Unsplash

Pants is just one of many build orchestration tools in the world. As of Pants v2.23.0, Pants better supports integrating seamlessly with other tools in your development workflow via the new "workspace environments" feature. With workspace environments, you can run processes in the repository itself (i.e., the workspace) instead of in the usual execution sandbox. This support is useful for better integrating Pants with third party tooling which assumes it runs from your repository.

Read on for an example of how to use this support to integrate Bazel with Pants.

Venerable Pythons, Pants, Pip, and Ecosystems

· 3 min read

Photo by David Clode / Unsplash

The Python development community concurrently supports multiple version of the Python programming language. These are in various states such as "prerelease", "bugfix", "security", or "end-of-life". For example version 3.12 is currently in "bugfix" while 3.8 is the oldest still receiving security updates. The cadence of future release is currently governed by PEP 602 – Annual Release Cycle for Python

Building Linux/x64 containers on OS X on Apple Silicon with Pants

· 3 min read
Alex Kouzemtchenko
CTO & Founder at Espresso AI

Espresso AI started as a primarily Linux shop, but as we've added more developers on OS X we've needed a way to build docker containers on OS X that are compatible with our Linux production environment.

Pants has supported running portions of the build in docker containers for a while, but the exact configuration is a little tricky, particularly if you want to build x86_64 containers on Apple ARM processors.

Announcing Klaviyo's Sponsorship

· 2 min read
Greg Niemann
Lead Site Reliability Engineer at Klaviyo

Today we are excited to announce that Klaviyo has become the first Platinum sponsor of the Pants project via the corporate sponsorship program! This is one of the first such sponsorships through our new Open Source Sponsorship program, through which we are trying to support the open source projects we depend on. While the core development and maintenance of Pants is volunteer driven, there are costs involved with maintaining and distributing such a large piece of software, costs which far too often are covered by individual volunteers. We benefit enormously from this project and want to help contribute to its ongoing success.

Pants 2.21.0 is released!

· 3 min read

We are pleased to announce Pants 2.21.0, the latest release of Pantsbuild, the scalable and ergonomic build system. To update, set pants_version = "2.21.0" in your pants.toml. If you're not using Pants yet, get started now.

Highlights in 2.21 include:

  • 🧪 All backends now support [test].attempts_default
  • ⚡ Pants internal manipulation of Python dependencies by way of Pex is now substantially faster in many cases.
  • 📜 The __defaults__ symbol will now set default values for generated targets too. For instance, __defaults__({python_source: dict(skip_black=True)}) will now apply to the python_source targets generated by a python_sources target, without having to write __defaults__({(python_source, python_sources): ...})
  • ♻ When running in CI, Pants will output a command to rerun only the failed tests.
  • 🐍 All built in lockfiles are now Python 3.12 ready.
  • 🚡 As part of regenerating lockfiles for Python 3.12, the default version of most builtin Python tools has been updated.
  • 🐳 The cache_from field on docker_image now supports multiple values.
  • 🏜 The experimental-deploy goal now has built-in support for the --dry-run option.
  • 🪜 Scalafix can now be run by Pants using the new pants.backend.experimental.scala.lint.scalafix backend.
  • 📈 And lots of smaller features, update, bugfixes, and general improvements

Pants 2.20.0 is released!

· 3 min read

We are pleased to announce Pants 2.20.0, the latest release of Pantsbuild, the scalable and ergonomic build system. To update, set pants_version = "2.20.0" in your pants.toml. If you're not using Pants yet, get started now.

Highlights in 2.20 include:

Inspecting dependency inference results

· 6 min read

An important distinguishing feature of Pants v2 is its ability to automatically infer your code's internal and external dependencies. The information about those inferences is available via the dependencies and peek goals, so that metadata about what modules import from other modules is always readily accessible to you.

Pants 2.19.0 is released!

· 5 min read
Tom Solberg
Pants Maintainer (and plugin developer)

Photo by Erol Ahmed / Unsplash

We're pleased to announce Pants 2.19.0, the latest release of Pantsbuild, the scalable and ergonomic build system. To update, set pants_version = "2.19.0" in your pants.toml. If you're not using Pants yet, get started now.

Highlights in 2.19 include:

  • New backends: semgrep and openapi-format
  • Test retries for flaky Python tests
  • buildx support in the Docker backend
  • Using parametrize to set multiple fields in tandem
  • And lots of smaller features, bugfixes, and general improvements

Pants 2.15: Easier multi-platform workflows, Docker build support, automatic code cleanup, and more!

· 7 min read

"Blue Bill Duck" by Richard Ashurst licensed under CC BY 2.0

The 2.15 series represents the biggest change to Pants since version 2.0, and we're excited to share how it can let you complete more workflows, more easily, in more places. Including cross-platform builds, containerized builds with Docker, and easier configuration for local builds...

Tweag case study: From adopting Pants, to generalizing our CI to multiple Python versions

· 9 min read
Clément Hurlin
Director of Engineering at Tweag

At Tweag we have a lot of experience with Bazel, as we maintain the Haskell rules. However, I had feedback that Bazel's Python support was not ideal. In contrast, Python is Pants' strong point. My client's fear of boilerplate also made Bazel unappealing. Whereas, Pants reduces boilerplate...

How we get quick feedback on new features via "experimental" backends

· 4 min read
Benjy Weinberger
Pants Co-creator and Maintainer

Image by NTNU, Faculty of Natural Sciences (license)

Pants balances release velocity and end-user stability via judicious use of deprecation cycles. Experimental backends are a way to get quick feedback on new functionality, before "graduating" it to the formal deprecation policy. Experimental features are still well-supported, and not to be feared!

Celebrating two years of Pants 2

· 7 min read

Pants 2's design incorporated many lessons learned from the first version of Pants, and many of its contemporary build systems. On Pants 2's 2nd anniversary, we return to some of the earliest decisions we made when rewriting Pants and look back at how they've helped us evolve at a remarkable pace...

Pants 2.14: Less boilerplate, more Rust, better support for Go monorepos, interactive debugging support, and more!

· 7 min read
Stu Hood
Pants Maintainer

Highlights include: less boilerplate via hierarchical defaults for target field values, better Golang monorepo support, with multiple go.mods, do more of your workflows in Pants with the experimental deploy goal (with initial support for Helm), and much more...

Pants 2.13: Easier at the command line, easier parallel execution in CI, Kotlin support, and better Python and JVM support!

· 8 min read

Photo by Henry & Co. / Unsplash

We're pleased to announce Pants 2.13.0. Highlights include better command line arguments for file sets, improved JVM support, easier access to parallel execution in CI, and lower barriers to adoption for Python projects that currently use existing distribution and build tools.

Optimizing Python + Docker deploys using Pants

· 8 min read
Joshua Cannon
Pants Maintainer

The Python and Docker logos, with a plus sign between them

Pants can build a PEX file, an executable zip file containing your Python code and all transitive dependencies. Deploying your application is as simple as copying the file. This post elaborates on how to get best performance out of the powerful combination of Pants+PEX+Docker.

AltStyle によって変換されたページ (->オリジナル) /