Skip to content

Replace have_program usage by Features #32957

@seblabbe

Description

@seblabbe

After #32650, remaining usage of have_program are:

$ git grep have_program
src/sage/interfaces/chomp.py:        from sage.misc.sage_ostools import have_program
src/sage/interfaces/chomp.py:        _have_chomp[program] = have_program(program)
src/sage/interfaces/phc.py:            from sage.misc.sage_ostools import have_program
src/sage/interfaces/phc.py:            if not have_program('phc'):
src/sage/misc/dist.py:    from sage.misc.sage_ostools import have_program
src/sage/misc/dist.py:        cmd_inside_sage = have_program(cmd, path=SAGE_BIN)
src/sage/misc/dist.py:        cmd_outside_sage = have_program(cmd, path=PATH)
src/sage/misc/sage_ostools.pyx:def have_program(program, path=None):
src/sage/misc/sage_ostools.pyx:        sage: from sage.misc.sage_ostools import have_program
src/sage/misc/sage_ostools.pyx:        sage: have_program('ls')
src/sage/misc/sage_ostools.pyx:        sage: have_program('there_is_not_a_program_with_this_name')
src/sage/misc/sage_ostools.pyx:        sage: have_program('sage', os.path.join(SAGE_VENV, 'bin'))
src/sage/misc/sage_ostools.pyx:        sage: have_program('sage', '/there_is_not_a_path_with_this_name')
src/sage/misc/sage_ostools.pyx:        sage: have_program('there_is_not_a_program_with_this_name', os.path.join(SAGE_VENV, 'bin'))
src/sage/misc/viewer.py:    from sage.misc.sage_ostools import have_program
src/sage/misc/viewer.py:    elif have_program('xdg-open'):
src/sage/misc/viewer.py:                if have_program(cmd):
src/sage/misc/viewer.py:                if have_program(cmd):
src/sage/misc/viewer.py:                if have_program(cmd):

See also:

CC: @seblabbe @tornaria

Component: distribution

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

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