Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/execute/binaries.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ Use one of the four options:
- Add a `python-load-from-s3` file in `binaries`, with a dd-trace-py commit ID or branch inside, the corresponding wheel will be loaded from S3
- Clone the dd-trace-py repo inside `binaries`: `cd binaries && git clone https://github.com/DataDog/dd-trace-py.git`

For fast local development (for `PARAMETRIC` and `INTEGRATION_FRAMEWORKS` scenarios):
For fast local development (for `PARAMETRIC`, `INTEGRATION_FRAMEWORKS`, otel and end-to-end scenarios):
- **Prerequisites (for most use cases, a one-time setup)**: Make sure the native extensions are built for the Python version being used by the scenario you are running. For example, the `PARAMETRIC` and `INTEGRATION_FRAMEWORKS` scenarios require Python 3.11.14 from the `python:3.11-slim` image.
- If they are not available (for example, if `ddtrace/internal/_encoding.cpython-311-aarch64-linux-gnu.so` does not exist), you will need to build them.
- Ensure Docker is running. In `dd-trace-py`, run `scripts/ddtest` to start up a shell which is based off of the `testrunner` image.
Expand Down
11 changes: 11 additions & 0 deletions utils/_context/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -1003,6 +1003,17 @@ def configure(self, *, host_log_folder: str, replay: bool):
except Exception:
logger.info("No local dd-trace-js found")

if library == "python":
try:
with open("./binaries/python-load-from-local", encoding="utf-8") as f:
path = f.read().strip(" \r\n")
source = os.path.join(str(Path.cwd()), path)
resolved_path = Path(source).resolve()
self.volumes[str(resolved_path)] = {"bind": "/volumes/dd-trace-py", "mode": "ro"}
self.environment["PYTHONPATH"] = f"{resolved_path!s}/ddtrace/bootstrap:/volumes/dd-trace-py"
except FileNotFoundError:
logger.info("No local dd-trace-py found, do not mount any volume or set any python path")

if library in ("php", "cpp_nginx"):
self.enable_core_dumps()

Expand Down
Loading