Skip to content

Instantly share code, notes, and snippets.

This file has been truncated, but you can view the full file.
[('add', '/packages.conda/pymeep-1.27.0-nompi_py39h1234567_102.conda'),
('add', '/packages.conda/pymeep-extras-1.27.0-nompi_py38h82cca05_102.conda'),
('add', '/packages.conda/pymeep-extras-1.27.0-nompi_py39h82cca05_102.conda'),
('add', '/packages.conda/terraform-provider-rancher2-2.0.0-h520bb56_0.conda'),
('add', '/packages.conda/pymeep-1.27.0-nompi_py38h1234567_102.conda'),
('add',
'/packages.conda/pymeep-extras-1.27.0-mpi_mpich_py311h23d43cc_2.conda'),
('add', '/packages.conda/pymeep-1.27.0-mpi_mpich_py310h1234567_2.conda'),
('add', '/packages.conda/pymeep-extras-1.27.0-nompi_py311h82cca05_102.conda'),
('add', '/packages.conda/mdsplus-7.139.53-py311pl5321h19eab63_0.conda'),
@dholth
dholth / build.py
Created July 29, 2024 21:11
Build .conda packages with conda-package-streaming
@contextmanager
def builder(
destination, file_id, is_info=lambda filename: filename.startswith("info/")
):
"""
Yield TarFile object for adding files, then transmute to "{destination}/{file_id}.conda"
"""
# Stream through a pipe instead of collecting all data in a temporary
# tarfile. Underlying transmute_stream collects data into separate pkg, info
# tar to be able to send complete size to zstd, so this strategy avoids one