Skip to content

Improve __init__.py import logic #6870

@alexreinking

Description

@alexreinking

In #6867 the halide Python module is split into a pure-Python parent package and a native-code sub-package. During the build, however, the native code exists in the build tree while the pure-Python code stays in the source tree.

The current hack is to edit sys.path, but then this code winds up in the distributed package. Not great.

The solution appears to be to create a test launcher script that adds a custom finder to the Python import system that knows where the native code module is.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions