Pants 2.22.0 is released!
Photo by
Florian Rebmann
on
Unsplash
Photo by
Florian Rebmann
on
Unsplash
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
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.
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.
Photo by Joshua Kettle / Unsplash
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:
[test].attempts_default
__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): ...})
cache_from
field on docker_image
now supports multiple values.experimental-deploy
goal now has built-in support for the --dry-run
option.pants.backend.experimental.scala.lint.scalafix
backend.A frequently asked question on Pants Slack is how to set a version - such as for a docker image, helm chart or Python distribution - based on git state.
Photo by Jongsun Leed / Unsplash
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:
BUILD
files and normal Python files.pom.xml
files, and other related improvements.sh_boot
executable
, and check
.emit_warnings
now works as advertised and comes with a global option.pants.backend.experimental.docker.podman
.Photo by Agence Olloweb / Unsplash
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.
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:
semgrep
and openapi-format
buildx
support in the Docker backendparametrize
to set multiple fields in tandemPhoto by Joseph Barrientos / Unsplash
Photo by Ankush Minda / Unsplash
Photo by Elaine Casap / Unsplash
If you need to make some functionality available to all engineers in your company, you can author and release a Pants plugin (either internally or via a public PyPI index) independently of the rest of the codebase...
This bird is called a ... Ruff! Just so you know. Photo by peterichman used under CC BY 2.0
Photo by Ben Hershey / Unsplash
Pants 2.16 introduces visibility features. These can be vital for keeping a monorepo's repository structure under control as the codebase grows. You'll benefit from having cleaner architecture and a dependency graph that is easier to reason about.
Photo by Nana Smirnova / Unsplash
Welcome to our new chat mirror, with all six of the current Slack public channels being mirrored to the web.
Photo by Hamish Duncan / Unsplash
Make builds more reliable and save time doing so. The upcoming Pants 2.16 introduces a couple of exciting changes to make Pants safer, faster, and more user-friendly. Here we preview a pair of changes which increase hermeticity.
Photo by Milada Vigerova / Unsplash
Now you can cross-test or cross-build your code on multiple different platforms concurrently, using Environments. Pants uses its precise knowledge of your build's deps to run exactly the relevant processes inside reusable Docker containers (or evenly remotely on a cluster of workers)…
Photo by Simon Maage / Unsplash
We embrace that open source is not code alone. We truly value a wide spectrum of contributions to Pants project and to the thriving community that underlies it. Here are some of the many ways anyone can potentially contribute to the vitality of Pants...
Photo by Unseen Studio / Unsplash
Photo by Mathew Schwartz / Unsplash
Now that Pants 2.15 is out, let's whet your appetite for 2.16: lint your Python monorepo faster than ever with Pants and Ruff, two projects that share a passion for combining the raw power of Rust with the elegance of Python.
Photo by Kira auf der Heide / Unsplash
Alexey reviews the Python packaging landscape. You'll learn more about the options you have, their pros and cons, and how to find the best approach to distribute your Python applications.
"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…
Photo by Granada, used under the CC Attribution-ShareAlike 4.0 International license
Photo by Xavi Cabrera / Unsplash
A Pants maintainer's personal and professional retrospective on nearly two years of involvement in the project, starting as a curious newcomer.
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…
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!
Photo by Jake Blucker / Unsplash
A year in, builds take only a few minutes (~150K LOC, ~1500 tests), PRs have become smaller as devs no longer try to squeeze as much as code as possible into a single change, code reviews get completed much faster (and are more likely to provide useful feedback), development velocity has increased…
"Happy Birthday Balloon" by Shelley & Dave is licensed under CC BY-NC 2.0.
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…
Unlike earlier build systems, Pants v2 automatically infers your code's internal and external dependencies. And it does this at the file level, so that you get optimal invalidation, caching, and concurrency performance without having to manually create and maintain mountains of BUILD file metadata.
Photo by James Wainscoat / Unsplash
Highlights include: less boilerplate via hierarchical defaults for target field values, better Golang monorepo support, with multiple go.mod
s, do more of your workflows in Pants with the experimental deploy
goal (with initial support for Helm), and much more…
How we worked around some quirks and limitations of GitHub Actions to skip CI jobs that aren't necessary in certain scenarios, without breaking branch protection rules that normally require those CI jobs to succeed.
I was born in the early 80's in a small fishing town in the Spanish Atlantic Coast, far away from the big urban sprawls and common traits of miles-long beaches, year-round summertime and chill out vibes normally identified with life in Spain. This is the autonomous region named Galicia…
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.
Pantsbuild provides a common interface to run all code quality tools in parallel. This post explores how Pants augments excellent linters such as bandit, flake8, shellcheck, etc. by offering its own linting mechanisms, too, including regex matches, dependency analysis, and metadata checks.
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.
Terminal output of a Pants run that retrieved test results from a remote cache instead of having to run the tests.
We ended up setting up a self-hosted GitHub Actions runner, on a hosted Mac M1. Getting the machine itself up and running was easy, thanks to MacStadium's simple, effective UX. But setting up the GHA runner on it was a little trickier, for a couple of reasons...
Photo by Georgia de Lotz / Unsplash
Rather than forcing global or per-project lockfiles, Pants uses a hybrid approach...This allows a repo to operate with the minimum number of lockfiles required to support their conflicting library versions, without necessarily going to the costly extreme of per-project lockfiles.
Photo by Charles Salutan / Unsplash
Image by Markus Spiske / CC0 1.0
Working effectively in a monorepo requires appropriate tooling. While Pants can be a really useful system in repos of all sizes and architectures, it has some features that make it particularly appealing in a monorepo setting…
Photo by Alexander Sinn / Unsplash
Pants's codegen support solves one of the biggest problems with code generation: how to make sure that local developers, CI, and production are using the same generated code?
Photo by Javier Allegue Barros / Unsplash
Choosing a compatible Python interpreter carefully is important not only for developers, but for the Pants repository administrators as well. Developers using Pants build system in their project may see various errors and have different behaviors depending on the Python interpreter...
We're pleased to announce Pants 2.9.0, the latest release of Pants: the scalable and ergonomic build system!
Photo by Anastasiia Rozumna / Unsplash
Photo credit: pages by Amy Loves Ya, used under CC BY 2.0 license
Photo by Samantha Lam / Unsplash
Photo by Jeremy Bezanger / Unsplash
Many considerations go into evaluating and adopting a new build system: performance, scalability language and framework support, ease of adoption and use, extensibility, compatibility with existing practices, and more.…
Why Pants for Golang? A consistent interface for all languages & tools, integration with Git + advanced project introspection, and remote caching and execution. All with minimal boilerplate.
Photo by Alessandra Caretto / Unsplash
Photo by Ian Taylor / Unsplash
Photo by Ian Taylor / Unsplash
Photo by Brent Ninaber / Unsplash
Photo by Joakim Honkasalo / Unsplash
Andreas lives in Visby, the main city of Gotland, which in turn is the biggest island in Sweden, and home to world-famous rauks. He is mostly self-taught as a developer, and has experience working with embedded systems and hardware engineering.
Photo by Elisa Calvet B. / Unsplash
Photo by Trust "Tru" Katsande / Unsplash
Pants 2.6 can now understand Poetry's pyproject.toml configuration for third-party dependency management, addressing one of our most requested features in the last year!
Pants Contributor Liam Wilson delves into this new feature as well as his experiences developing the macro as a Toolchain intern.
Photo by Thomas Ciszewski / Unsplash
Successful open source projects are full of tradeoffs between purity vs. pragmatism. We often remind ourselves "Do not let perfect be the enemy of good".
Photo by Giulia May / Unsplash
Photo by Marcos Luiz Photograph / Unsplash
Photo by Nicholas Cappello / Unsplash
Photo by Will Francis / Unsplash
Photo by Darling Arias / Unsplash
Photo by Yasamine June / Unsplash
Photo by Simon Wilkes / Unsplash
As of Pants 2.2, Pants now knows how to use dependency inference with Protobuf! This includes:
Photo by Craventure Media / Unsplash
Fast incremental re-builds are critical in large codebases and monorepos. Thanks to deep support for cancellation and a side-effect free execution model, Pants is able to further reduce re-build latency by speculatively re-executing work.
Photo by Jonathan Farber / Unsplash
Photo by Volodymyr Hryshchenko / Unsplash
How the Pants build tool empowers incremental migrations by:
Photo by Martin Sanchez / Unsplash
Scalable build tools have historically meant a significant boilerplate burden.
But it doesn't have to be that way! Pants v2 supports all of the caching, concurrency, and introspection you need to scale your repository, with significantly less boilerplate, thanks to… Dependency inference!
Photo by Jess Bailey / Unsplash
There are so many tools in the Python development ecosystem. Installing, configuring and orchestrating them—all while not re-executing work unnecessarily—is a hard problem, especially as your codebase grows.
Fortunately, there is now a tailor-made (pun intended) solution: Pants v2!