The most widely used Python to C compiler
Clone or download
Permalink
Failed to load latest commit information.
Cython Make switch-statement work nicely with line tracing. Sep 23, 2018
Demos Added the pep8 test to travis. All the warnings are disabled and only… Aug 11, 2018
Doc/s5 Remove obsolete documentation Apr 10, 2017
Tools Specify license in cython-mode.el's header Nov 11, 2017
appveyor AppVeyor: Update config file and install script Oct 1, 2015
bin Changed some filenames. Mar 17, 2018
docs Merge pull request #2623 from nicktimko/patch-1 Sep 22, 2018
pyximport Fix importing of namespace packages. Add in a regtest for the same. May 24, 2018
tests Make switch-statement work nicely with line tracing. Sep 23, 2018
.coveragerc Enable coverage reporting in travis runs. Merge C/C++ jobs into one t… Aug 26, 2018
.editorconfig Include header file types in editor config. Sep 17, 2018
.gitignore Corrected the URL of the notebook, removed the output of the cells and Aug 21, 2018
.hgignore Rename BUILD to TEST_TMP for bazel support. Sep 16, 2016
.hgtags Added tag 0.21.2 for changeset ab1a3afb8775 Dec 27, 2014
.mailmap Add initial .mailmap file. Sep 17, 2015
.travis.yml Stop ignoring Stackless-3 failures in travis since it seems to work r… Sep 23, 2018
BUILD.bazel Rename BUILD file to avoid conflict with build directory. Oct 10, 2016
CHANGES.rst Update changelog. Sep 23, 2018
COPYING.txt Clarify license position with respect to compilation output. Jul 23, 2014
INSTALL.txt Remove trailing whitespace. Dec 13, 2010
LICENSE.txt Fixes the lineends in LICENSE.txt Feb 9, 2009
MANIFEST.in Remove unused file reference from sdist. Sep 8, 2018
Makefile Make Makefile a little more generic to simplify code copying from oth… Aug 31, 2018
README.rst Improve "contributing" section in readme. May 5, 2018
ToDo.txt Remove trailing whitespace. Dec 13, 2010
USAGE.txt Remove trailing whitespace. Dec 13, 2010
appveyor.yml Increase number of test shards again as 4 instead of 7 made it a bit … Aug 25, 2018
cygdb.py scripts with shebangs <-> executable + uniform use of #!/usr/bin/env … Dec 6, 2012
cython.py make `%load_ext cython` still valid May 5, 2014
cythonize.py globally install "cythonize" script Jul 13, 2014
pylintrc allow "scanner.sy" as attribute name in pylint Mar 28, 2016
runtests.py Disable the numpy tests also for the new "numpy_old" tag. Sep 22, 2018
setup.py Warn when no "language_level" is specified to prepare the transition … Sep 16, 2018
setupegg.py Fix open mode in setupegg.py wrapper script May 25, 2015
test-requirements-cpython.txt Exclude installation of "line_profiler" in travis for PyPy since it f… Sep 5, 2017
test-requirements.txt Added the pep8 test to travis. All the warnings are disabled and only… Aug 11, 2018
tox.ini Added the pep8 rule: W291 trailing whitespaces. Aug 26, 2018

README.rst

Welcome to Cython!

Cython is a language that makes writing C extensions for Python as easy as Python itself. Cython is based on Pyrex, but supports more cutting edge functionality and optimizations.

The Cython language is very close to the Python language, but Cython additionally supports calling C functions and declaring C types on variables and class attributes. This allows the compiler to generate very efficient C code from Cython code.

This makes Cython the ideal language for wrapping external C libraries, and for fast C modules that speed up the execution of Python code.

Installation:

If you already have a C compiler, just do:

pip install Cython

otherwise, see the installation page.

License:

The original Pyrex program was licensed "free of restrictions" (see below). Cython itself is licensed under the permissive Apache License.

See LICENSE.txt.

Contributing:

Want to contribute to the Cython project? Here is some help to get you started.

Get the full source history:

Note that Cython used to ship the full version control repository in its source distribution, but no longer does so due to space constraints. To get the full source history, make sure you have git installed, then step into the base directory of the Cython source distribution and type:

make repo

The following is from Pyrex:

This is a development version of Pyrex, a language for writing Python extension modules.

For more info, see:

  • Doc/About.html for a description of the language
  • INSTALL.txt for installation instructions
  • USAGE.txt for usage instructions
  • Demos for usage examples

Comments, suggestions, bug reports, etc. are welcome!

Copyright stuff: Pyrex is free of restrictions. You may use, redistribute, modify and distribute modified versions.

The latest version of Pyrex can be found here.

Greg Ewing, Computer Science Dept
University of Canterbury
Christchurch, New Zealand
A citizen of NewZealandCorp, a wholly-owned subsidiary of USA Inc.