Public API¶
Whey extension for creating Conda packages for Python projects.
Classes:
|
Builds Conda packages using metadata read from |
-
class
CondaBuilder
(project_dir, config, build_dir=None, out_dir=None, *, verbose=False, colour=None)[source]¶ Bases:
WheelBuilder
Builds Conda packages using metadata read from
pyproject.toml
.- Parameters
Methods:
build
()Build the Conda distribution.
Build the Conda distribution.
create_conda_archive
(wheel_contents_dir[, …])Create the conda archive.
Returns a list of the project’s runtime requirements.
Write the conda
about.json
file.write_conda_index
([build_number])Write the conda
index.json
file.write_license
(dest_dir[, dest_filename])Write the
LICENSE
file.Attributes:
Provides a default for the
build_dir
argument.The
info
directory in the build directory for Conda builds.-
build_conda
()[source]¶ Build the Conda distribution.
- Return type
- Returns
The filename of the created archive.
-
get_runtime_requirements
()[source]¶ Returns a list of the project’s runtime requirements.
- Return type
-
write_conda_index
(build_number=1)[source]¶ Write the conda
index.json
file.See also
https://docs.conda.io/projects/conda-build/en/latest/resources/package-spec.html#info-index-json
- Parameters
build_number (
int
) – Default1
.
whey_conda.config
¶
Configuration for whey-conda
.
Classes:
Parser for the |
-
class
WheyCondaParser
[source]¶ Bases:
AbstractConfigParser
Parser for the
[tool.whey-conda]
table frompyproject.toml
.Attributes:
The keys to parse from the TOML file.
Methods:
parse
(config[, set_defaults])Parse the TOML configuration.
parse_conda_channels
(config)Parse the
conda-channels
key, giving a list of required conda channels to build and use the package.parse_conda_description
(config)Parse the
conda-description
key, giving the description of the package.parse_conda_extras
(config)Parse the
conda-extras
key, giving a list of extras (see optional-dependencies) to include as requirements in the Conda package.-
parse_conda_channels
(config)[source]¶ Parse the
conda-channels
key, giving a list of required conda channels to build and use the package.The default value is
[]
.Example:
[tool.whey-conda] conda-channels = [ "domdfcoding", "conda-forge", "bioconda", ]
-
parse_conda_description
(config)[source]¶ Parse the
conda-description
key, giving the description of the package.You can use a single
%s
in the description, which will be substituted with the value of the description key frompyproject.toml
.The default value is
'%s'
.Example:
[tool.whey-conda] conda-description = "Fantastic Spam!"
-
parse_conda_extras
(config)[source]¶ Parse the
conda-extras
key, giving a list of extras (see optional-dependencies) to include as requirements in the Conda package.The special keyword
'all'
indicates all extras should be included.The special keyword
'none'
indicates no extras should be included.
The default value is
'none'
.Examples:
[tool.whey-conda] conda-extras = [ "test", "doc",] [tool.whey-conda] conda-extras = "all"
-