Skip to content

Meson build: sage_getsource.sageinspect doesn't work due to missing sources #39874

@antonio-rojas

Description

@antonio-rojas

Steps To Reproduce

Tests in sage.misc.sageinspect are failing due to missing sources. There is the issue, already reported in #39735, that the absolute path of the sources is embedded at build time. But even after this is fixed, tests will still fail in a packaged sage if cython sources are not shipped.

IMO sources should be included in the wheel: this software is mostly used by mathematicians for which inspecting the implementation details may be of interest, even if they are not developers. Ipython provides a very convenient UI for doing that, and if would be nice for this to work for compiled as well as non-compiled modules. But if it is decided that they will not be shipped, these tests should be gracefully skipped (maybe with a new #sources tag)

Expected Behavior

No test failures

Actual Behavior

$ python -m sage.doctest --long sage/src/sage/misc/sageinspect.py
[...]
**********************************************************************
5 items had failures:
   3 of  27 in sage.misc.sageinspect
   2 of  26 in sage.misc.sageinspect.__internal_tests
   1 of  48 in sage.misc.sageinspect.sage_getargspec
   2 of   7 in sage.misc.sageinspect.sage_getfile_relative
   6 of  31 in sage.misc.sageinspect.sage_getsourcelines
    [356 tests, 14 failures, 20.33s wall]
----------------------------------------------------------------------
sage -t --long --warn-long 30.0 --random-seed=4903767262386099346921216050020413248 sage/src/sage/misc/sageinspect.py  # 14 doctests failed
----------------------------------------------------------------------

Additional Information

No response

Environment

  • OS: Arch Linux
  • Sage Version: 10.7.beta0

Checklist

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.
  • I have read the documentation and troubleshoot guide

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions