-
Notifications
You must be signed in to change notification settings - Fork 2.4k
[Proposal] Add sanity check to import Python modules #1305
Copy link
Copy link
Closed
Labels
Description
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.
Reactions are currently unavailable