Using Cython CFLAGS to enable some feature

5 views
Skip to first unread message

Muhammad Hawash

unread,
Oct 30, 2025, 1:23:43 AM (2 days ago) Oct 30
to cython-users
Hi, 

I'm on Windows 11 and using Cython through the command line to compile a module where I wanna enable  CYTHON_TRACE  trough the CFLAGS env var, but it doesn't work for me as I tried many times through both commands Cython and Cythonization by setting it as a compile time env and through setting it under the current session env in terminal, I guess it might be overridden somehow. The only way it worked for me through the Extension object using a setup.py file, but can't go with that path for some reasons, so I'm looking for a way to enable  CYTHON_TRACE by passing it somehow through  CLI/Shell. Thanks.

da-woods

unread,
Oct 30, 2025, 3:39:55 AM (2 days ago) Oct 30
to cython...@googlegroups.com

In the past I've found that "set" (https://learn.microsoft.com/en-us/windows-server/administration/windows-commands/set_1) works on cmd. And `$env:CFLAGS =` works on powershell. However it sounds like you're already tried those.


On 29/10/2025 22:55, Muhammad Hawash wrote:
Hi, 

I'm on Windows 11 and using Cython through the command line to compile a module where I wanna enable  CYTHON_TRACE  trough the CFLAGS env var, but it doesn't work for me as I tried many times through both commands Cython and Cythonization by setting it as a compile time env and through setting it under the current session env in terminal, I guess it might be overridden somehow. The only way it worked for me through the Extension object using a setup.py file, but can't go with that path for some reasons, so I'm looking for a way to enable  CYTHON_TRACE by passing it somehow through  CLI/Shell. Thanks.
--

---
You received this message because you are subscribed to the Google Groups "cython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cython-users...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cython-users/18f650ea-dd95-4a41-843d-31ae13eeaadfn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages