Skip to content

sagelib setup.py: Dependencies on header files of packages #29711

@mkoeppe

Description

@mkoeppe

Rebuilds should be triggered when headers of relevant packages change.

In setup.py (after #29702, sage_setup.command.sage_build_cython) we have:

# Do not put all, but only the most common libraries and their headers
# (that are likely to change on an upgrade) here:
# [At least at the moment. Make sure the headers aren't copied with "-p",
# or explicitly touch them in the respective spkg's spkg-install.]
lib_headers = { "gmp":     [ os.path.join(SAGE_INC, 'gmp.h') ],   # cf. #8664, #9896
                "gmpxx":   [ os.path.join(SAGE_INC, 'gmpxx.h') ],
                "ntl":     [ os.path.join(SAGE_INC, 'NTL', 'config.h') ]
              }

Except for this (which is much too limited and also needs updating in light of the spkg-configure mechanism), we do not have dependency tracking for sagelib. Neither of distutils, setuptools, cython seem to have a mechanism for generating dependencies like gcc -M. This would certainly be nice to have; in particular if it included dependencies on "system" headers and libraries, so that sagelib could automatically rebuild when system headers/libraries change (as in, most recently, ​https://groups.google.com/d/msg/sage-release/A53tGGsJNLg/uA01oUugAQAJ).

(from #29411)

CC: @dimpase @EmmanuelCharpentier @orlitzky @kliem @slel

Component: build

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions