• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

pantsbuild / pants / 19486760608 / 8
80%
main: 80%

Build:
DEFAULT BRANCH: main
Ran 19 Nov 2025 01:59AM UTC
Files 1178
Run time 55s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

19 Nov 2025 01:42AM UTC coverage: 40.356%. Remained the same
19486760608.8

push

github

web-flow
nfpm.native_libs: new backend for nfpm pkg deps (only elfdeps subsystem) (#22873)

## PR Series Overview

This is the first in a series of PRs that introduces a new backend:
`pants.backend.npm.native_libs`
Initially, the backend will be available as:
`pants.backend.experimental.nfpm.native_libs`

I proposed this new backend (originally named `bindeps`) in discussion
#22396.

This backend will inspect ELF bin/lib files (like `lib*.so`) in packaged
contents (for this PR series, only in `pex_binary` targets) to identify
package dependency metadata and inject that metadata on the relevant
`nfpm_deb_package` or `nfpm_rpm_package` targets. Effectively, it will
provide an approximation of these native packager features:
- `rpm`: `rpmdeps` + `elfdeps`
- `deb`: `dh_shlibdeps` + `dpkg-shlibdeps` (These substitute
`${shlibs:Depends}` in debian control files have)

### Goal: Host-agnostic package builds

This pants backend is designed to be host-agnostic, like
[nFPM](https://nfpm.goreleaser.com/).

Native packaging tools are often restricted to a single release of a
single distro. Unlike native package builders, this new pants backend
does not use any of those distro-specific or distro-release-specific
utilities or local package databases. This new backend should be able to
build deb and rpm packages anywhere that pants can run (MacOS, rpm linux
distros, deb linux distros, other linux distros, docker, ...).

## PR Overview

To achieve the host-agnostic goal, the scripts in this new backend use
pure-python deps to search the ELF bin/lib files for provided and/or
required SONAMEs:

- `elfdeps` ([:package:](https://pypi.org/project/elfdeps/) |
[:octocat:](https://github.com/python-wheel-build/elfdeps)):
> "Python implementation of RPM
[elfdeps](https://github.com/rpm-software-management/rpm/blob/master/tools/elfdeps.c)."

- `pyelftools` ([:package:](https://pypi.org/project/pyelftools/) |
[:octocat:](https://github.com/eliben/pyelftools)):
> "A pure-Python library f... (continued)

24332 of 60293 relevant lines covered (40.36%)

0.4 hits per line

Source Files on job test_python_linux_x86_64_1/10 - 19486760608.8
  • Tree
  • List 1178
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 19486760608
  • dcfff5c7 on github
  • Prev Job for on main (#19455731846.2)
  • Next Job for on main (#19525956643.12)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc