Skip to content

Use custom build_ext to compile Cython code #21600

@jdemeyer

Description

@jdemeyer

In src/setup.py, we should not run cythonize() manually. It would be better to use a custom build_ext command for that.

This is inspired by the build_ext from Cython 0.25: https://github.com/cython/cython/blob/master/Cython/Distutils/build_ext.py
Unfortunately, we cannot really use that since it doesn't allow to pass options to cythonize().

Due to a Cython bug, this warning gets displayed even though the cache option is valid: UserWarning: got unknown compilation option, please remove: cache.

Depends on #21604

CC: @mkoeppe @embray

Component: build

Author: Jeroen Demeyer

Branch/Commit: dfcd817

Reviewer: Matthias Koeppe, Erik Bray

Issue created by migration from https://trac.sagemath.org/ticket/21600

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions