Thanks to visit codestin.com
Credit goes to github.com

Skip to content

sage.env.sage_include_directories: Don't use distutils and SAGE_LIB #33137

@tornaria

Description

@tornaria
  • src/sage/env.py uses distutils.sysconfig.get_python_inc() which is deprecated, it has no replacement in sysconfig.

Suggestion from fbissey: "we could use sysconfig.get_config_var('INCLUDEPY') which should give the same value." #33135 comment:7

We also remove the use of SAGE_LIB in preparation of namespace packages.

This is the last use of distutils in the Sage library, except for uses in src/sage/features/__init__.py and src/sage/misc/cython.py, which are merely fallbacks when setuptools is not present.

Comment from arojas: "I don't see any code in sagelib or cython that would emit this. Is this still needed at all?"

Follow-up: Once these uses of distutils are removed, their modules can be removed from the regex in the call to filterwarnings introduced by #33135.

Part of

Depends on #32873

CC: @antonio-rojas @dimpase

Component: misc

Author: Frédéric Chapoton, Matthias Koeppe

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions