Skip to content

[Proposal] Add sanity check to import Python modules #1305

@adamjstewart

Description

@adamjstewart

I've run into a few Python packages so far that built without any trouble, but raised error messages when trying to import them. See #1156 (comment) for an example.

A quick and easy sanity check would be to import the newly installed Python package using the Python installation it was built with. In the case of py-meep, the module name depends on how it was built. For py-meep+mpi, the module name is meep_mpi. For py-meep~mpi, it is meep. We will need some kind of function to return the correct module name for each package. It is probably safe to default to self.name.replace('py-', '').

I believe the actual implementation should wait until after #1186 is complete. That way, it can easily be added to a PythonPackage class.

Metadata

Metadata

Assignees

No one assigned

    Labels

    pythontestsGeneral test capability(ies)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions