Skip to content

There is no way to specify a root of python's package structure #6903

@barancev

Description

@barancev

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

In the selenium project (https://github.com/SeleniumHQ/selenium) we have a top-level directory per language. When we try and run python tests, it seems as if the root of the project is treated as part of python's package structure. In reality, it lacks an __int__.py file, and so shouldn't be.

Here is a sample project that mimics this structure:
bazel-sample.zip

Run bazel test python/... to reproduce the issue.

Test fails with an import error 'No module named other.thing', bazel would like it to be python.other.thing as if the python directory is a part of python's package structure.

What operating system are you running Bazel on?

Windows 7

What's the output of bazel info release?

0.19.2

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