thoth.solver.python package¶
Submodules¶
thoth.solver.python.base module¶
Classes for resolving dependencies as specified in each ecosystem.
-
class
thoth.solver.python.base.
DependencyParser
[source]¶ Bases:
object
Base class for Dependency parsing.
-
class
thoth.solver.python.base.
ReleasesFetcher
[source]¶ Bases:
object
A base class for fetching package releases.
thoth.solver.python.instrument module¶
Functions which are executed inside virtual environment.
These functions are used to gather characteristics about installed packages which are analyzed.
All the functions are executed in a virtualenv - they should print information to stdout, if any error occurs they should print error messages to stderr and call sys.exit with non-zero value. All necessary functions should be either from standard virtualenv packages or from standard library to remove any dependency inference.
-
thoth.solver.python.instrument.
execute_env_function
(python_bin, function, *, env=None, raise_on_error=True, is_json=False, **function_arguments)[source]¶ Execute the given function in Python interpreter.
thoth.solver.python.python module¶
Dependency requirements solving for Python ecosystem.
-
thoth.solver.python.python.
extract_metadata
(metadata, index_url)[source]¶ Extract and enhance information from metadata.
thoth.solver.python.python_solver module¶
Classes for resolving dependencies as specified in each ecosystem.
-
class
thoth.solver.python.python_solver.
PythonDependencyParser
[source]¶ Bases:
thoth.solver.python.base.DependencyParser
Python Dependency parsing.
-
class
thoth.solver.python.python_solver.
PythonReleasesFetcher
(*, source: thoth.python.source.Source)[source]¶ Bases:
thoth.solver.python.base.ReleasesFetcher
A releases fetcher based on PEP compatible simple API (also supporting Warehouse API).
-
property
index_url
¶ Get URL to package source index from where releases are fetched.
-
source
¶
-
property
-
class
thoth.solver.python.python_solver.
PythonSolver
(*, dependency_parser: thoth.solver.python.python_solver.PythonDependencyParser, releases_fetcher: thoth.solver.python.python_solver.PythonReleasesFetcher)[source]¶ Bases:
thoth.solver.python.base.Solver
PyPI dependencies solver.
-
dependency_parser
¶
-
releases_fetcher
¶
-
Module contents¶
Implementation of ecosystem specific solvers.
-
thoth.solver.python.
get_ecosystem_solver
(ecosystem_name)[source]¶ Get Solver subclass instance for particular ecosystem.
- Parameters
ecosystem_name – name of ecosystem for which solver should be get
- Returns
Solver
-
class
thoth.solver.python.
PythonReleasesFetcher
(*, source: thoth.python.source.Source)[source]¶ Bases:
thoth.solver.python.base.ReleasesFetcher
A releases fetcher based on PEP compatible simple API (also supporting Warehouse API).
-
property
index_url
¶ Get URL to package source index from where releases are fetched.
-
source
¶
-
property
-
class
thoth.solver.python.
PythonDependencyParser
[source]¶ Bases:
thoth.solver.python.base.DependencyParser
Python Dependency parsing.
-
class
thoth.solver.python.
PythonSolver
(*, dependency_parser: thoth.solver.python.python_solver.PythonDependencyParser, releases_fetcher: thoth.solver.python.python_solver.PythonReleasesFetcher)[source]¶ Bases:
thoth.solver.python.base.Solver
PyPI dependencies solver.
-
dependency_parser
¶
-
releases_fetcher
¶
-