Skip to content

Commit d0f07bc

Browse files
authored
fix(profiling): don't build _memalloc extension when using Pyston (backport #3566) (#3592)
This is an automatic backport of pull request #3566 done by [Mergify](https://mergify.com). --- <details> <summary>Mergify commands and options</summary> <br /> More conditions and actions can be found in the [documentation](https://docs.mergify.com/). You can also trigger Mergify actions by commenting on this pull request: - `@Mergifyio refresh` will re-evaluate the rules - `@Mergifyio rebase` will rebase this PR on its base branch - `@Mergifyio update` will merge the base branch into this PR - `@Mergifyio backport <destination>` will backport this PR on `<destination>` branch Additionally, on Mergify [dashboard](https://dashboard.mergify.com/) you can: - look at your merge queues - generate the Mergify configuration with the config editor. Finally, you can contact us on https://mergify.com </details>
1 parent a3d2292 commit d0f07bc

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

docs/spelling_wordlist.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ pymongo
120120
pymysql
121121
pynamodb
122122
pyodbc
123+
pyston
123124
pytest
124125
quickstart
125126
redis
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
fixes:
3+
- |
4+
Fix issue building ``ddtrace`` for the Pyston Python implementation by
5+
not building the ``_memalloc`` extension anymore when using Pyston.

setup.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
DEBUG_COMPILE = "DD_COMPILE_DEBUG" in os.environ
1818

19+
IS_PYSTON = hasattr(sys, "pyston_version_info")
20+
1921

2022
def load_module_from_project_file(mod_name, fname):
2123
"""
@@ -184,7 +186,7 @@ def get_exts_for(name):
184186
ddwaf_libraries = ["ddwaf"]
185187

186188

187-
if sys.version_info[:2] >= (3, 4):
189+
if sys.version_info[:2] >= (3, 4) and not IS_PYSTON:
188190
ext_modules = [
189191
Extension(
190192
"ddtrace.profiling.collector._memalloc",

0 commit comments

Comments
 (0)