Configuring pyproject.toml
If you are working with a project using a pyproject.toml
file, you
can add configuration options for whl2conda in the [tool.whl2conda]
section of the file rather than using command line options.
The easiest way to start with these options, is to generate default options with comments using:
$ whl2conda config --generate-pyproject my-project-dir/
This is safe to use on an existing pyproject file and will not overwrite any existing options.
In general, whl2conda command line options will override options
specified in the pyproject.toml
file.
The available options are described below.
pyproject.toml options
conda-name
Overrides name of conda package generated by whl2conda.
If empty, default is taken from project.name
(or tool.poetry.name
if build backend is poetry).
This is overriden by the --name
convert option.
wheel-dir
The default directory for whl2conda to look for wheels. Specified relative to the project root. If not specified, defaults to 'dist'.
Overridden by the --wheel-dir
convert option.
out-dir
The default directory for writing conda packages. If not specified, this will be the wheel directory.
Overridden by the --out-dir
convert option.
conda-format
The default output conda package format. Valid values are:
"V1"
/".tar.bz2"
: original .tar.bz2 package format"V2"
/".conda"
: new V2 .conda package format"TREE"
: output package as directory tree (for debugging)
Overridden by the --format
convert option.
dependency-rename
An optional list of pypi/conda rename patterns. Each entry should be a two element list of the form:
["<pypi-name-pattern>", "<conda-name>"]',
Where <pypi-name-pattern>
may either just be the pypi package name
or is a Python regular expression that will match the full name,
and where acme-<foo>
packages to acme.<foo>
:
["acme-(.*)", "acme.$1"]
extra-dependencies
An optional list of extra conda dependencies.