mirror of
https://github.com/open-telemetry/opentelemetry-python-contrib.git
synced 2025-07-28 20:52:57 +08:00
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:
@ -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__":
|
||||
|
Reference in New Issue
Block a user