CYTHONIZE(1)

πŸ“¦
version 3.1.6 Β· 3 versions
, in ubuntu resolute, ubuntu stonking

πŸ’– CYTHONIZE(1) πŸ’–

okay bestie, welcome to cythonize from the User Commands corner of the manual, and no cap this one is a whole vibe πŸ’…


✨ NAME ✨

cythonize β€” compile Cython code (.pyx) into C so you can build a Python extension πŸ¦‹


🌸 DESCRIPTION 🌸

so the usage is literally this, copy it exactly pls:

usage: cythonize [-h] [-X NAME=VALUE,...] [-E NAME=VALUE,...] [-s
       NAME=VALUE]

       [-2] [-3] [--3str] [-+] [-a] [--annotate-fullc] [-x PATTERN] [-b]
       [-i] [--timeit CODESTRING] [--setup CODESTRING] [-j N] [-f] [-q]
       [--lenient] [-k] [--no-docstrings] [-M] [sources ...]

like, that's the whole shape of it, and it's giving "I have opinions and I will share them" 🌈

πŸŽ€ positional arguments: πŸŽ€

  • sources β€” the files you're feeding in, your main characters fr

πŸ’œ options: πŸ’œ

  • -h, --help β€” show this help message and exit, the classic escape hatch 🫢
  • -X, --directive NAME=VALUE,... β€” set a compiler directive
  • -E, --compile-time-env NAME=VALUE,... β€” set a compile time environment variable
  • -s, --option NAME=VALUE β€” set a cythonize option
  • -2 β€” use Python 2 syntax mode by default
  • -3 β€” use Python 3 syntax mode by default
  • --3str β€” use Python 3 syntax mode by default (deprecated alias for -3) ⚠️ it's deprecated, so like, it still works but it's giving "old news"
  • -+, --cplus β€” Compile as C++ rather than C πŸ”₯
  • -a, --annotate β€” Produce a colorized HTML version of the source. ✨ aesthetic AND useful
  • --annotate-fullc β€” Produce a colorized HTML version of the source which includes entire generated C/C++-code. like the annotated version but extra, it shows the whole generated C/C++-code too πŸ‘‘
  • -x, --exclude PATTERN β€” exclude certain file patterns from the compilation πŸ™ˆ
  • -b, --build β€” build extension modules using distutils/setuptools
  • -i, --inplace β€” build extension modules in place using distutils/setuptools (implies -b)
  • --timeit CODESTRING β€” build in place, then compile+run CODESTRING as benchmark in first module's namespace (implies -i) ⏱️
  • --setup CODESTRING β€” use CODESTRING as pre-benchmark setup code for --bench
  • -j, --parallel N β€” run builds in N parallel jobs (default: 6) β€” six at once, we love a multitasking queen πŸ’…
  • -f, --force β€” force recompilation
  • -q, --quiet β€” be less verbose during compilation 🀫
  • --lenient β€” increase Python compatibility by ignoring some compile time errors
  • -k, --keep-going β€” compile as much as possible, ignore compilation failures, she does not give up πŸ’ͺ
  • --no-docstrings β€” strip docstrings
  • -M, --depfile β€” produce depfiles for the sources

🌈 Environment variables: 🌈

  • CYTHON_FORCE_REGEN: if set to 1, forces cythonize to regenerate the output files regardless

of modification times and changes.

bestie reminder: those two Cython env vars and the setuptools ones are all doing real work behind the scenes, so don't just set them and forget, iykyk 🧚

and that's the whole page, fr fr πŸ“ this was Cython 3.1.6, from March 2026 β€” ty for reading, mwah πŸ’–πŸŽ€

πŸ“¦ where this page comes from