python-Cython
Port variant v13
Summary Compiler to write C extensions for Python (3.13)
Package version 3.1.0
Homepage https://cython.org/
Keywords python
Maintainer Python Automaton
License Not yet specified
Other variants v12
Ravenports Buildsheet | History
Ravensource Port Directory | History
Last modified 10 MAY 2025, 14:01:14 UTC
Port created 04 JAN 2020, 01:03:23 UTC
Subpackage Descriptions
single The Cython language makes writing C extensions for the Python language as easy as Python itself. Cython is a source code translator based on Pyrex_, but supports more cutting edge functionality and optimizations. The Cython language is a superset of the Python language (almost all Python code is also valid Cython code), but Cython additionally supports optional static typing to natively call C functions, operate with C++ classes and declare fast 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 writing glue code for external C/C++ libraries, and for fast C modules that speed up the execution of Python code. The newest Cython release can always be downloaded from https://cython.org/. Unpack the tarball or zip file, enter the directory, and then run:: pip install . Note that for one-time builds, e.g. for CI/testing, on platforms that are not covered by one of the wheel packages provided on PyPI *and* the pure Python wheel that we provide is not used, it is substantially faster than a full source build to install an uncompiled (slower) version of Cython with:: NO_CYTHON_COMPILE=true pip install . .. _Pyrex: https://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/ 3.1.0 (2025-05-08) ================== Features added -------------- 3.1.0 rc 2 (2025-05-07): * Declarations for C++ ``std::stop_token were added as libcpp.stop_token`` to provide additional low-level synchronisation primitives also in the light of free-threading Python. (Github issue https://github.com/cython/cython/issues/6820) * The generation of the shared module now happens automatically from ``cythonize() in a setuptools build if a corresponding Extension`` has been configured. This avoids an additional step outside of the ``setup.py or pip wheel`` run. (Github issue https://github.com/cython/cython/issues/6842) 3.1.0 rc 1 (2025-05-01): * ``cython.pymutex provides a fast mutex by wrapping the new PyMutex`` feature of recent CPython versions (including free-threading) and falls back to PyThread locks in older Pythons. (Github issue https://github.com/cython/cython/issues/6579) * A new directive ``subinterpreters_compatible=shared_gil/own_gil`` was added to allow modules to declare support for subinterpreters. (Github issue https://github.com/cython/cython/issues/6513) * ``divmod()`` is also optimised for C floating point types and can be called on C number types without holding the GIL. (Github issue https://github.com/cython/cython/issues/6801) * New C++ declarations were added. (Github issues https://github.com/cython/cython/issues/6625, https://github.com/cython/cython/issues/6731) * embedsignature now works for special methods (if they have a docstring). (Github issue https://github.com/cython/cython/issues/1577) 3.1.0 beta 1 (2025-04-03): * Global ``cdef const …`` variables are supported. (Github issue https://github.com/cython/cython/issues/6542) * A new context manager / function decorator ``cython.critical_section`` was added wrapping Python's critical section C-API feature. (Github issues https://github.com/cython/cython/issues/6516, https://github.com/cython/cython/issues/6577) * Some common Cython-internal code (currently only memoryview related) can now be extracted into a shared extension module to reduce the installed overall size of a package with many Cython compiled modules. (Github issue https://github.com/cython/cython/issues/2356) * The type of prange loop targets is now inferred. (Github issue https://github.com/cython/cython/issues/6585) * Extracting keyword arguments is faster in some cases.
Configuration Switches (platform-specific settings discarded)
PY312 OFF Build using Python 3.12 PY313 ON Build using Python 3.13
Package Dependencies by Type
Build (only) python313:dev:std
python-pip:single:v13
autoselect-python:single:std
Build and Runtime python313:primary:std
Download groups
main mirror://PYPIWHL/9f/cc/221af506254978b119a2f6769b81b16bcfe09e0fb3fc5ab66e53e536d933
Distribution File Information
4e460bdf1d8742ddf4914959842f2f23ca4934df97f864be799ddf1912acd0ab 1227398 python-src/cython-3.1.0-py3-none-any.whl
Ports that require python-Cython:v13
python-PyYAML:v13 YAML parser and emitter for Python (3.13)
python-borgbackup:v13 Deduplicated, encrypted, compressed backups (3.13)
python-compreffor:v13 CFF subroutinizer for fontTools (3.13)
python-lxml:v13 Binding to libxml2 and libxslt libraries (3.13)
python-numpy:v13 Array computing for Python (3.13)
python-pandas:v13 Data structures for time series, statistics (3.13)
python-pyclipper:v13 Cython wrapper for the AJ Clipper library (3.13)
python-pyzmq:v13 Python bindings for 0MQ (3.13)
python-scipy:v13 Scientific library for Python (3.13)