cph utility

usage: cph [-h] [-V] {extract,x,create,c,transmute,t,list,l} ...

Named Arguments

-V, --version

Show the conda-package-handling version number and exit.

subcommands

subcommand

Possible choices: extract, x, create, c, transmute, t, list, l

Sub-commands

extract (x)

extract package contents

cph extract [-h] [--dest DEST] [--prefix PREFIX] [--info] archive_path

Positional Arguments

archive_path

path to archive to extract

Named Arguments

--dest

destination folder to extract to. If not set, defaults to package filename minus extension in the same folder as the input archive. May be relative path used in tandem with the –prefix flag.

--prefix

base directory to extract to. Use this to set the base directory, while allowing the folder name to be automatically determined by the input filename. An abspath –prefix with an unset –dest will achieve this.

--info

If the archive supports separate metadata, this flag extracts only the metadata in the info folder from the package. If the archive does not support separate metadata, this flag has no effect and all files are extracted.

Default: False

create (c)

bundle files into a package

cph create [-h] [--file-list FILE_LIST] [--out-folder OUT_FOLDER]
           prefix out_fn

Positional Arguments

prefix

folder of files to bundle. Not strictly required to have conda package metadata, but if conda package metadata isn’t present, you’ll see a warning and your file will not work as a conda package

out_fn

Filename of archive to be created. Extension determines package type.

Named Arguments

--file-list

Path to file containing one relative path per line that should be included in the archive. If not provided, lists all files in the prefix.

--out-folder

Folder to dump final archive to

transmute (t)

convert from one package type to another

cph transmute [-h] [--out-folder OUT_FOLDER] [--force] [--processes PROCESSES]
              [--zstd-compression-level {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22}]
              [--zstd-compression-threads ZSTD_COMPRESSION_THREADS]
              in_file out_ext

Positional Arguments

in_file

existing file to convert from. Glob patterns accepted.

out_ext

extension of file to convert to. Examples: .tar.bz2, .conda

Named Arguments

--out-folder

Folder to dump final archive to

--force

Force overwrite existing package

Default: False

--processes

Max number of processes to use. If not set, defaults to 1.

--zstd-compression-level

Possible choices: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22

When building v2 packages, set the compression level used by conda-package-handling. Defaults to 19.

Default: 19

--zstd-compression-threads

When building v2 packages, set the compression threads used by conda-package-handling. Defaults to 1. -1=automatic.

Default: 1

list (l)

List package contents like python -m tarfile –list … would do.

cph list [-h] [-v] archive_path

Positional Arguments

archive_path

path to archive to inspect

Named Arguments

-v, --verbose

Report more details, similar to ‘ls -l’. Otherwise, only the filenames are printed.

Default: False