ELF deps
Python implementation of RPM elfdeps. The elfdeps tool can extract dependencies and provides from an ELF binary.
Example
$ elfdeps --requires /usr/bin/python3.12
libc.so.6(GLIBC_2.34)(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libpython3.12.so.1.0()(64bit)
libc.so.6()(64bit)
rtld(GNU_HASH)
$ elfdeps --provides /usr/lib64/libpython3.12.so
libpython3.12.so.1.0()(64bit)
$ elfdeps --provides /lib64/libc.so.6
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.2.6)(64bit)
libc.so.6(GLIBC_2.3)(64bit)
...
libc.so.6(GLIBC_2.36)(64bit)
libc.so.6(GLIBC_2.38)(64bit)
libc.so.6(GLIBC_ABI_DT_RELR)(64bit)
libc.so.6(GLIBC_PRIVATE)(64bit)
libc.so.6()(64bit)
elfdeps can also inspect archives like Python wheels and extract symbols:
$ elfdeps --symbols torchaudio-2.11.0-cp312-cp312-manylinux_2_28_x86_64.whl
filename: torchaudio/lib/_torchaudio.abi3.so
requires:
- libgcc_s.so.1(GCC_3.0)(64bit)
- libc.so.6(GLIBC_2.2.5)(64bit)
- ...
provides: []
machine: EM_X86_64
is_dso: true
is_exec: true
got_debug: false
got_hash: false
got_gnuhash: true
soname: _torchaudio.abi3.so
exported_symbols:
- _ZN10torchaudio12cuda_versionEv
- _ZN10torchaudio18is_align_availableEv
- ...
imported_symbols:
- ...
- aoti_torch_abi_version
- aoti_torch_delete_library_object
- ...
With the optional demangle extra (pip install elfdeps[demangle]),
--demangle demanges C++ symbol names:
$ elfdeps --symbols --demangle torchaudio-2.11.0-cp312-cp312-manylinux_2_28_x86_64.whl
...
exported_symbols:
- torchaudio::cuda_version()
- torchaudio::is_align_available()
- ...
RPM
In Fedora-based distributions, RPM packages provide and require virtual packages with ELF sonames and versions. The package manager can install virtual provides.
The python3 base package depends on libpython3.12.so.1.0()(64bit) and libc.so.6(GLIBC_2.34)(64bit):
$ rpm -qR python3
libc.so.6()(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.34)(64bit)
libpython3.12.so.1.0()(64bit)
...
rtld(GNU_HASH)
The python3-libs package virtually provides libpython3.12.so.1.0()(64bit):
$ rpm -qP python3-libs
bundled(libb2) = 0.98.1
libpython3.12.so.1.0()(64bit)
libpython3.so()(64bit)
python-libs = 3.12.3-2.fc39
python3-libs = 3.12.3-2.fc39
python3-libs(x86-64) = 3.12.3-2.fc39
python3.12-libs = 3.12.3-2.fc39
$ sudo dnf install 'libc.so.6(GLIBC_2.34)(64bit)' 'libpython3.12.so.1.0()(64bit)'
Package glibc-2.38-18.fc39.x86_64 is already installed.
Package python3-libs-3.12.3-2.fc39.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
Public API
- dataclass
elfdeps.ELFAnalyzeSettings - exception
elfdeps.ELFError - dataclass
elfdeps.ELFInfo - dataclass
elfdeps.SOInfo elfdeps.analyze_dirtree(dirname, settings=None) -> Generator[ELFInfo, None, None]elfdeps.analyze_elffile(elffile, *, filename, is_exec, settings=None) -> ELFInfoelfdeps.analyze_file(filename, *, settings=None) -> ELFInfoelfdeps.analyze_tarfile(tfile, *, settings=None) -> Generator[ELFInfo, None, None]elfdeps.analyze_tarmember(tfile, tarinfo, *, settings=None) -> ELFInfoelfdeps.analyze_zipfile(zfile, *, settings=None) -> Generator[ELFInfo, None, None]elfdeps.analyze_zipmember(zfile, zipinfo, *, settings=None) -> ELFInfo
Metadata
Release files for elfdeps 0.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| elfdeps-0.4.0.tar.gz | 23.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| elfdeps-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 44.0 kB
Release files / elfdeps-0.4.0.tar.gz
| Download URL | elfdeps-0.4.0.tar.gz |
|---|---|
| Size | 23.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
09655f500a8602e2776e016d069843cfd2ce1b8df1bf1a7b6ecb1c22d82577e5
|
|
BLAKE2b-256 checksum How to use checksums |
1827d429186f5d4fb5f9ce882e9de7dee0a4f33c58e45b90058dbc59d30cf63f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 8, 2026.
Transparency logRelease files / elfdeps-0.4.0-py3-none-any.whl
| Download URL | elfdeps-0.4.0-py3-none-any.whl |
|---|---|
| Size | 20.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
383b765a6bb7d4716328878ab0c79cfe06bac1cb5de3acbad9de12d6d71142b3
|
|
BLAKE2b-256 checksum How to use checksums |
67b14b4348eaf6072c6f6c02cee003472a7ccb88c205a07f79ffc9b0e039cbe4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 8, 2026.
Transparency log