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:
WheelBuilderBuilds 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.jsonfile.write_conda_index([build_number])Write the conda
index.jsonfile.write_license(dest_dir[, dest_filename])Write the
LICENSEfile.Attributes:
Provides a default for the
build_dirargument.The
infodirectory 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.jsonfile.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:
AbstractConfigParserParser 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-channelskey, giving a list of required conda channels to build and use the package.parse_conda_description(config)Parse the
conda-descriptionkey, giving the description of the package.parse_conda_extras(config)Parse the
conda-extraskey, giving a list of extras (see optional-dependencies) to include as requirements in the Conda package.parse_max_python_version(config)Parse the
max-python-versionkey, giving the maximum Python 3.x version to consider requirements for.parse_min_python_version(config)Parse the
min-python-versionkey, giving the minimum Python 3.x version to consider requirements for.- parse_conda_channels(config)[source]¶
Parse the
conda-channelskey, 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-descriptionkey, giving the description of the package.You can use a single
%sin 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-extraskey, 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"