Skip to content

Support bazel repositories by documenting environment file format #45

Open
@jlisee

Description

@jlisee

Is your feature request related to a problem? Please describe.

When trying to run scip-python on my Bazel based repository with a non-standard requirements.txt location and no use of pip the program locks up in the Evaluating python environment dependencies stage.

Describe the solution you'd like

I would like to be able to generate the dependency map myself since our repository installs dependencies through Bazel, hence files are in non-standard locations and the requirements.txt file has a non-standard location and path.

We have enough automation in place that will be straight forward to maintain, and way easier than trying to tool to understand our build system.

Additional context

Pyright itself works fine with just using [tool.pyright] extraPaths in our pyproject.toml to find these locations, a sample simple configuration:

[tool.pyright]
# Pylance plugin does not have an option to exclude paths so we do it here
exclude = ["bazel-av", "bazel-out", "bazel-bin", "bazel-external", "bazel-testlogs", "external", "avos-build", ".git", "**/node_modules", "**/__pycache__"]
extraPaths = [
    # For each library
    "./external/internal_pip_dependency_click/pypi__click",
    "./external/internal_pip_dependency_gitpython/pypi__gitpython",
    "./external/internal_pip_dependency_more_itertools/pypi__more_itertools",
    "./external/internal_pip_dependency_pytest/pypi__pytest",
    "./external/internal_pip_dependency_pyyaml/pypi__pyyaml",
    "./external/internal_pip_dependency_tabulate/pypi__tabulate",
    # For generated code like protobufs
    "./bazel-bin",
]

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions