Skip to content

require --mod-sys in non-CI contexts to install via system package managers #364

Description

@2bndy5

Currently, clang-tools tries to install from system-specific package managers if PyPI does not satisfy the version/platform requirements.

This yield unexpected results. For example,

clang-tools --version 11

will fail to find v11 of clang-tidy on PyPI. It then tries to install clang-tidy-11 via apt on Linux. If apt install clang-tidy-11 fails, then it adds the official LLVM PPA and tries to install from apt again.

This is especially undesirable on Windows because it will try to install from winget and chocolatey. But on Windows, these installers actually replace any pre-existing version already installed ⁉️

Proposal

  1. Only try to install from package managers if CI env var is not present or not equal to true.
  2. If the user still wants to use package managers to install clang tools, then they'll have to opt-in with a new flag --mod-sys (short for "modify system").

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions