Cython.Build.cythonize does not respect CC or GCC environment variables
See original GitHub issueCython.Build.cythonize
does not respect the CC
and / or GCC
environment variables and defaults to the gcc
binary. This is especially problematic with conda-build >= 3.0
, where the {{ compiler('c') }}
requirement installs compilers of the form x86_64-conda_cos6-linux-gnu-cc
instead of cc
, etc.
I created an example Cython package that fails to build using standard conda-build but passes if I create symlinks from gcc
to ${GCC}
.
See also: StackOverflow - Set default compiler when using Cython and setuptools to compile multiple extensions
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
How to use a different C++ compiler in Cython? - Stack Overflow
Distutils by default uses the CC system environment variable to decide what compiler to use. You can run the python script such that...
Read more >Source Files and Compilation - Cython's Documentation
One way is to compile it manually with the Cython compiler, e.g.: ... Note that if you are not relying on cythonize or...
Read more >Python – How to tell distutils to use gcc - iTecNote
this flag is not recognized, because the compiler is clang: ... skipping 'Interface.cpp' Cython extension (up-to-date) building 'Interface' extension cc ...
Read more >Thread Parallelism in Cython* - Intel
Cython * is a superset of Python* that additionally supports C ... set the proper environment variables and delete all previous build:.
Read more >27122 (Compile with -march=native) - Sage Trac - SageMath
We try to respect the users choice and do not overwrite the flags if ... but anything else that respects the environment variables...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thank you for your help, and sorry for the noise.
This issue is not related to Cython.
For the benefit of others, for whatever reason, this issue only appears when the
conda-forge
channel is ahead of thedefaults
channel in the~/.condarc
file…Again, Cython is not calling the C compiler. It’s done by distutils, which makes use of
$CC
.