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

pantsbuild / pants / 19486760608
80%

Build:
DEFAULT BRANCH: main
Ran 19 Nov 2025 01:47AM UTC
Jobs 12
Files 1724
Run time 4min
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: 80.303% (+0.01%) from 80.29%
19486760608

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)

200 of 233 new or added lines in 5 files covered. (85.84%)

78277 of 97477 relevant lines covered (80.3%)

3.36 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
7
81.58
src/python/pants/backend/nfpm/native_libs/elfdeps/subsystem.py
12
72.73
src/python/pants/backend/nfpm/native_libs/elfdeps/rules.py
14
77.42
src/python/pants/backend/nfpm/native_libs/elfdeps/analyze.py
Jobs
ID Job ID Ran Files Coverage
1 test_python_linux_arm64 - 19486760608.1 19 Nov 2025 01:59AM UTC 1162
43.25
GitHub Action Run
2 test_python_linux_x86_64_2/10 - 19486760608.2 19 Nov 2025 01:48AM UTC 1180
46.92
GitHub Action Run
3 test_python_linux_x86_64_3/10 - 19486760608.3 19 Nov 2025 01:47AM UTC 1177
45.69
GitHub Action Run
4 test_python_linux_x86_64_7/10 - 19486760608.4 19 Nov 2025 01:48AM UTC 1184
42.69
GitHub Action Run
5 test_python_macos14_arm64 - 19486760608.5 19 Nov 2025 01:56AM UTC 1162
43.26
GitHub Action Run
6 test_python_linux_x86_64_5/10 - 19486760608.6 19 Nov 2025 01:48AM UTC 1192
47.99
GitHub Action Run
7 test_python_linux_x86_64_4/10 - 19486760608.7 19 Nov 2025 01:47AM UTC 1214
49.94
GitHub Action Run
8 test_python_linux_x86_64_1/10 - 19486760608.8 19 Nov 2025 01:48AM UTC 1178
40.36
GitHub Action Run
9 test_python_linux_x86_64_9/10 - 19486760608.9 19 Nov 2025 01:47AM UTC 1185
45.07
GitHub Action Run
10 test_python_linux_x86_64_8/10 - 19486760608.10 19 Nov 2025 01:48AM UTC 1180
45.43
GitHub Action Run
11 test_python_linux_x86_64_0/10 - 19486760608.11 19 Nov 2025 01:47AM UTC 1199
46.98
GitHub Action Run
12 test_python_linux_x86_64_6/10 - 19486760608.12 19 Nov 2025 01:47AM UTC 1180
40.84
GitHub Action Run
Source Files on build 19486760608
  • Tree
  • List 1724
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #19486760608
  • dcfff5c7 on github
  • Prev Build on main (#19455731846)
  • Next Build on main (#19525956643)
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