Simplify bootstrap and generate code (#514)

- We now automatically generate bootstrap_gen.py file from the list of instrumentations present in the source tree.
- Bootstrap command now uses consumes this auto-generated list instead of keeping it's own local copy.
- We no longer uninstall packages before installing them as instrumentation package no longer specify libraries as dependencies so the edge cases are no longer there.
- We no longer try to install an incompatible version or force upgrade/downgrade an installed version. This used to leave systems in broken states which should happen no more.
This commit is contained in:
Owais Lone
2021-06-01 21:49:09 +05:30
committed by GitHub
parent af7ab072cc
commit 5d1f3201af
47 changed files with 1330 additions and 215 deletions

View File

@ -17,6 +17,7 @@
import logging
import os
import subprocess
import sys
from jinja2 import Template
@ -72,7 +73,17 @@ def main():
with open(generated_file, "w") as fh:
fh.write(generated)
fh.flush()
subprocess.run(["black", "-q", generated_file], check=True)
subprocess.run(
[
sys.executable,
"scripts/eachdist.py",
"format",
"--path",
"instrumentation",
],
check=True,
)
if __name__ == "__main__":