falconry / falcon

The no-magic web data plane API and microservices framework for Python developers, with a focus on reliability, correctness, and performance at scale.
https://falcon.readthedocs.io/en/stable/
Apache License 2.0
9.53k stars 945 forks source link

chore: change `setup.py` to use optional build_ext option #2242

Closed CaselIT closed 4 months ago

CaselIT commented 4 months ago

This allows skipping the compilation of the c file if it fails for some reason, like the compiler is missing. The build will still fail if cython can't generate the c file from the py/pyx file but that should be ok.

The optional keyword is documented here https://setuptools.pypa.io/en/latest/userguide/ext_modules.html#setuptools.Extension

optional (bool) – specifies that a build failure in the extension should not abort the build process, but simply not install the failing extension.

Fixes: #2237

codecov[bot] commented 4 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 100.00%. Comparing base (6ba54b4) to head (5c70ac4).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #2242 +/- ## ========================================= Coverage 100.00% 100.00% ========================================= Files 63 63 Lines 6852 6852 Branches 1260 1260 ========================================= Hits 6852 6852 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

CaselIT commented 4 months ago

Thanks. Will merge with master soon!

CaselIT commented 4 months ago

updated