Clean up pyproject.toml#714
Conversation
| run: | | ||
| echo "Patching pyproject.toml to use latest build of dd-trace-py" | ||
| sed -i 's|^ddtrace =.*$|ddtrace = { file = "${{ steps.find-ddtrace-wheel.outputs.wheel_path }}" }|' pyproject.toml | ||
| sed -zEi 's|^ddtrace =.*$|ddtrace = { file = "${{ steps.find-ddtrace-wheel.outputs.wheel_path }}" }|' pyproject.toml |
There was a problem hiding this comment.
Just curious, what does this change do?
There was a problem hiding this comment.
The workflow for the system-tests previously assumed that the ddtrace dependency definition would be on one line and this resulted in all of the Github actions (but not local or Gitlab) build layer jobs failing. This flag allows the more complex definition. @florentinl
| wrapt = "^1.11.2" | ||
| ddtrace = ">=3.19.1,<4" | ||
| ddtrace = [ | ||
| {version = ">=3.19.1,<4", python = ">=3.8,<3.10"}, |
There was a problem hiding this comment.
I believe this syntax is poetry specific and invalid for pip's TOML parser causing build failures in
https://gitlab.ddbuild.io/DataDog/serverless-tools/-/jobs/1395912909
and https://github.com/DataDog/dd-trace-py/actions/runs/21604577086/job/62290700940?pr=16313
This reverts commit aee6842.
What does this PR do?
Dedups the poetry and project sections of the pyproject.toml file.
Motivation
Fixing dependency management of ddtrace version based on Python runtime in the PyPI wheel. Response to #713
Testing Guidelines
CI. Made a sample python package with the new format of the pyproject.toml file and uploaded it to the test PyPI website. Made sure that differentp Python runtimes depend on different versions of ddtrace and that Python 3.10+ users can customize which version of ddtrace 4.X they want to use.
Additional Notes
Types of Changes
Check all that apply