RunExportsJson#
RunExportsJson
#
A representation of the run_exports.json
file found in package archives.
The run_exports.json
file contains information about the run exports of a package
noarch: List[str]
property
writable
#
NoArch run exports apply a run export only to noarch packages (other run exports are ignored). For example, python uses this to apply a dependency on python to all noarch packages, but not to the python_abi package.
Examples#
strong: List[str]
property
writable
#
Strong run exports apply a dependency from build to host and run.
Examples#
strong_constrains: List[str]
property
writable
#
Strong constrains apply a constrain dependency from build to host and run.
Examples#
weak_constrains: List[str]
property
writable
#
Weak constrains apply a constrain dependency from host to build, or run to host.
Examples#
__init__(weak=None, strong=None, noarch=None, weak_constrains=None, strong_constrains=None)
#
Create a new RunExportsJson instance.
Parameters#
weak : List[str] | None, optional Weak run exports apply a dependency from host to run strong : List[str] | None, optional Strong run exports apply a dependency from build to host and run noarch : List[str] | None, optional Noarch run exports apply a run export only to noarch packages weak_constrains : List[str] | None, optional Weak constrains apply a constrain dependency from host to build, or run to host strong_constrains : List[str] | None, optional Strong constrains apply a constrain dependency from build to host and run
Examples#
>>> run_exports = RunExportsJson(
... weak=["weak_dep 1.0"],
... strong=["strong_dep 2.0"],
... noarch=["noarch_dep 3.0"],
... weak_constrains=["weak_constrain 4.0"],
... strong_constrains=["strong_constrain 5.0"]
... )
>>> run_exports
RunExportsJson(weak=['weak_dep 1.0'], strong=['strong_dep 2.0'], noarch=['noarch_dep 3.0'], weak_constrains=['weak_constrain 4.0'], strong_constrains=['strong_constrain 5.0'])
>>>
__repr__()
#
Returns a representation of the RunExportsJson.
from_package_archive(path)
staticmethod
#
Parses the package file from archive.
Note: If you want to extract multiple info/*
files then this will be slightly
slower than manually iterating over the archive entries with
custom logic as this skips over the rest of the archive
from_package_directory(path)
staticmethod
#
Parses the object by looking up the appropriate file from the root of the specified Conda archive directory, using a format appropriate for the file type.
For example, if the file is in JSON format, this function reads the appropriate file from the archive, parse the JSON string and return the resulting object. If the file is not in a parsable format or if the file could not be read, this function returns an error.
from_path(path)
staticmethod
#
Parses the object from a file specified by a path
, using a format
appropriate for the file type.
For example, if the file is in JSON format, this function reads the data from the file at the specified path, parse the JSON string and return the resulting object. If the file is not in a parsable format or if the file could not read, this function returns an error.
Examples#
from_str(string)
staticmethod
#
Parses the object from a string, using a format appropriate for the file type.
For example, if the file is in JSON format, this function parses the JSON string and returns the resulting object. If the file is not in a parsable format, this function returns an error.
package_path()
staticmethod
#
Returns the path to the file within the Conda archive.
The path is relative to the root of the archive and includes any necessary directories.