Skip to content

Commit 395edf5

Browse files
authored
chore(vendor/psutil): set py_limited_api for posix extension (#15549)
## Description This lets us use the same .so file across different python versions. <!-- Provide an overview of the change and motivation for the change --> ## Testing <!-- Describe your testing strategy or note what tests are included --> ## Risks <!-- Note any risks associated with this change, or "None" if no risks --> ## Additional Notes <!-- Any other information that would be helpful for reviewers -->
1 parent 73210fe commit 395edf5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ddtrace/vendor/psutil/setup.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -645,6 +645,9 @@ def adapt_extension(original_ext, new_name):
645645
define_macros=macros,
646646
libraries=[],
647647
)
648+
# Copy py_limited_api from the main extension for consistency
649+
if hasattr(ext, "py_limited_api"):
650+
posix_ext.py_limited_api = ext.py_limited_api
648651

649652
# Add platform-specific libraries for posix extension
650653
if SUNOS:

0 commit comments

Comments
 (0)