8000 Update documentation for utilizing py_library from nested folder · Issue #54 · bazel-contrib/rules_python · GitHub
[go: up one dir, main page]

Skip to content
Update documentation for utilizing py_library from nested folder #54
Closed
@PranavSathy

Description

@PranavSathy

Hi Everyone,

My current folder structure is as follows:

WORKSPACE
analysis/
analysis/analysis.py
analysis/BUILD
analysis/analyzers/average.py
analysis/analyzers/BUILD

I am trying to import all the analyzers in my analysis.py file, and the two BUILD rules look as follows:

py_binary(
    name = "analysis",
    srcs = ["analysis.py"],
    deps = [
      "//analysis/analyzers",
      requirement("pandas"),
      requirement("plotly"),
    ],
)
py_library(
    name = "analyzers",
    srcs = ["average.py"],
    deps = [
       requirement("pandas"),
    ],
)

It seems like I have tried every way of attempting to import analyzers into my analysis.py file, including;

import analyzers
import analysis.analyzers
from analysis import analyzers
from analysis.analyzers import analyzers
from analysis.analyzers import average

along with those combinations with my WORKSPACE name.

Am I missing something obvious? thanks!

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0