Skip to content

Remove libarchive #5788

@dholth

Description

@dholth

What happened?

conda-build still uses libarchive e.g. in conda_build/utils.py, but conda-package-handling only uses Python standard libraries plus zstandard. It could probably get by without libarchive, which also causes other problems.
Update conda-build to remove libarchive usage.

This would need to be done with direct tarfile / zipfile usage (or a different library?), and can't be accomplished with conda-package-handling, streaming which is too specialized to conda packages.

It might be a challenge to support every libarchive format. In conda_build/utils.py these formats are mentioned.

# This is the lowest common denominator of the formats supported by our libarchive/python-libarchive-c
# packages across all platforms
decompressible_exts = (
    ".7z",
    ".tar",
    ".tar.bz2",
    ".tar.gz",
    ".tar.lzma",
    ".tar.xz",
    ".tar.z",
    ".tar.zst",
    ".tgz",
    ".whl",
    ".zip",
    ".rpm",
    ".deb",
)

7z, rpm, deb are probably the only ones "not in the Python standard library". We could also consider a libarchive fallback or a command line extraction tool for that sort of archive.

conda-build already has code for a command line fallback for archive formats, but I'm unsure when it would be used.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type::deprecationrequests removal of deprecated feature(s)type::featurerequest for a new feature or capability

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions