spliced package
Submodules
spliced.client module
spliced.logger module
- class spliced.logger.ColorizingStreamHandler(nocolor=False, stream=<_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'>, use_threads=False)[source]
Bases:
StreamHandler
- BLACK = 0
- BLUE = 4
- BOLD_SEQ = '\x1b[1m'
- COLOR_SEQ = '\x1b[%dm'
- CYAN = 6
- GREEN = 2
- MAGENTA = 5
- RED = 1
- RESET_SEQ = '\x1b[0m'
- WHITE = 7
- YELLOW = 3
- colors = {'CRITICAL': 1, 'DEBUG': 4, 'ERROR': 1, 'INFO': 2, 'WARNING': 3}
- emit(record)[source]
Emit a record.
If a formatter is specified, it is used to format the record. The record is then written to the stream with a trailing newline. If exception information is present, it is formatted using traceback.print_exception and appended to the stream. If the stream has an ‘encoding’ attribute, it is used to determine how to do the output to the stream.
- property is_tty
spliced.schemas module
spliced.experiment module
spliced.experiment.base module
- class spliced.experiment.base.Experiment[source]
Bases:
object
A base Experiment holds information for a splice experiment!
- add_splice(result, success=False, splice=None, command=None, different_libs=False, package=None)[source]
Add a splice to the experiment
A splice can either be successful (so it will have libs, binaries, etc) or it can represent a failed state (for any number of reasons)
TODO refactor so we do one splice at a time TODO can we cache the splice setup? # ALSO add cache variable to save cache for smeagle (add to spack experiment)
- init(package, splice, experiment, replace=None, validate=True, splice_versions=None)[source]
Init config variables directly
- property name
- property package
- property package_so_prefix
- predict(names=None, skip=None, predict_type=None)[source]
Given a single named predictor (or a list to skip) make predictions.
- property replace
- property splice
- property splice_so_prefix
- property splice_versions
- class spliced.experiment.base.Splice(package=None, splice=None, experiment=None, replace=None, result=None, success=False, different_libs=False)[source]
Bases:
object
A Splice holds the metadata for a splice, and if successful (or possible) will hold a result. A default splice result is not successful
spliced.experiment.spack module
- class spliced.experiment.spack.SpackDiffExperiment[source]
Bases:
SpackExperiment
The main spack experiment does a diff.
- class spliced.experiment.spack.SpackExperiment[source]
Bases:
Experiment
- concretize(spec_name=None, error_message='spec-concretization-failed', spec=None, different_libs=False)[source]
A shared function to attempt concretization.
- do_install(spec, error_message, name=None, different_libs=False)[source]
Helper function to do an install.
- get_spack_ld_library_paths(original)[source]
Get all of spack’s changes to the LD_LIBRARY_PATH for elfcall
- class spliced.experiment.spack.SpackSpliceExperiment[source]
Bases:
SpackExperiment
- do_splice(splice_name, spec_main, transitive=True)[source]
do the splice, the spliced spec goes into the main spec
- mock_splice(splice_name, replace_name, spec_main)[source]
A mock splice is not possible with spack (it usually means replacing one dependency with another that isn’t an actual dependency) but we can still install the needed specs and then add their libs / binaries for other predictors. A “mock” of different libs means different_libs is set to True on the splice.
- run(*args, **kwargs)[source]
Perform a splice with a SpecA (a specific spec with a binary), and SpecB (the high level spec that is a dependency that we can test across versions).
Arguments: package (specA_name): the name of the main package we are splicing up splice (specB_name): the spec we are removing / switching out replace (specC_name): the spec we are splicing in (replacing with)
For many cases, specB and specC might be the same, but not always.
- spliced.experiment.spack.add_contenders(spec, loc='lib', match=None)[source]
Given a spec, find contender binaries and/or libs
spliced.predict module
spliced.predict.base module
- class spliced.predict.base.Prediction[source]
Bases:
object
A prediction is a base for assessing a Splice and making predictions.
- create_elfcall_deps_lookup(splice, libs)[source]
This is subbing in a library with a version of itself, and requires binaries
spliced.predict.symbolator module
spliced.predict.libabigail module
- class spliced.predict.libabigail.LibabigailPrediction[source]
Bases:
Prediction
- abicompat = None
- abidiff = None
- full_prediction(splice)[source]
A full prediction is run with spliced splice, includes libs and binaries.
- run_abidiff(original_lib, replace_lib)[source]
Run abi diff with an original and comparison library
- debuginfo files:
By default, libabigail will look in /usr/lib/debug for separate debug files (.debug) generated by gcc. Alternate locations can be specified by using the environment variables LIBABIGAIL_DEBUGINFO_DIR{1,2} for the original and comparison libraries, respectively.