[SciPy-Dev] Cython code generation with Jinja2 templates
Mark Alexander Mikofski
mikofski at berkeley.edu
Fri Aug 31 03:58:18 EDT 2018
Hi All,
I would like to use Jinja2 templates to generate the Cython pyx and pxd
files necessary for the Cython Optimize Zeros API proposed in #8431, maybe
in a follow up PR
https://github.com/scipy/scipy/pull/8431
Does anyone have any experience with code generation in SciPy? Is it best
to generate the files offline and then commit them to the repository, or is
it better to add some scripting to either setup.py or to the CI yaml config
files?
I put something together in a branch in my scipy fork, and it recreates the
existing code verbatim. See the templates folder and
_generate_zeros_type.py script.
https://github.com/mikofski/scipy/tree/cython_optimize_generate_code/scipy/optimize/cython_optimize
Any comments would be greatly appreciated.
thanks!
Mark
--
Mark Mikofski, PhD (2005)
*Fiat Lux*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20180831/18fdb8a4/attachment.html>
More information about the SciPy-Dev
mailing list