Releases: bazel-contrib/bazel-mypy-integration
Releases · bazel-contrib/bazel-mypy-integration
0.4.0
WORKSPACE snippet:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "mypy_integration",
sha256 = "cf94c102fbaccb587eea8de5cf1cb7f55c5c74396a2468932c3a2a4df989aa1d",
strip_prefix = "bazel-mypy-integration-0.4.0",
url = "https://github.com/thundergolfer/bazel-mypy-integration/archive/refs/tags/0.4.0.tar.gz",
)
load(
"@mypy_integration//repositories:repositories.bzl",
mypy_integration_repositories = "repositories",
)
mypy_integration_repositories()
load("@mypy_integration//:config.bzl", "mypy_configuration")
# Optionally pass a MyPy config file, otherwise pass no argument.
mypy_configuration("//tools/typing:mypy.ini")
load("@mypy_integration//repositories:deps.bzl", mypy_integration_deps = "deps")
mypy_integration_deps(
mypy_requirements_file="//tools/typing:mypy_version.txt",
# python_interpreter = "python3.9" # /home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin is searched for exe.
# OR
# python_interpreter_target = "@python3_interpreter//:bin/python3",
)
What's Changed
- Update README link to bazel aspects doc by @RadixSeven in #56
- chore: remove examples/.bazelrc by @alexeagle in #59
- Replace
mypy_integration_config
repo with label flag by @UebelAndre in #62
New Contributors
- @RadixSeven made their first contribution in #56
- @UebelAndre made their first contribution in #62
Full Changelog: 0.3.0...0.4.0
0.3.0
WORKSPACE snippet:
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
name = "mypy_integration",
sha256 = "fc42524d636b138a1940780deb680cdbf318cda84b14b4b3e3ba3b715e2480cf",
strip_prefix = "bazel-mypy-integration-0.3.0",
url = "https://github.com/thundergolfer/bazel-mypy-integration/archive/refs/tags/0.3.0.tar.gz",
)
load(
"@mypy_integration//repositories:repositories.bzl",
mypy_integration_repositories = "repositories",
)
mypy_integration_repositories()
load("@mypy_integration//:config.bzl", "mypy_configuration")
# Optionally pass a MyPy config file, otherwise pass no argument.
mypy_configuration("//tools/typing:mypy.ini")
load("@mypy_integration//repositories:deps.bzl", mypy_integration_deps = "deps")
mypy_integration_deps(
mypy_requirements_file="//tools/typing:mypy_version.txt",
# python_interpreter = "python3.9" # /home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:/home/runner/.local/bin:/opt/pipx_bin:/home/runner/.cargo/bin:/home/runner/.config/composer/vendor/bin:/usr/local/.ghcup/bin:/home/runner/.dotnet/tools:/snap/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin is searched for exe.
# OR
# python_interpreter_target = "@python3_interpreter//:bin/python3",
)
What's Changed
- allow setting extra pip args in repositories/deps.bzl by @harrysarson in #44
- Remove transitive dependencies for mypy. by @robbrit in #45
- tidy test scripts by @thundergolfer in #52
- Update Bazel version used in repo, both locally and CI by @thundergolfer in #53
- report stdout error info in failed tests, if it exists by @thundergolfer in #54
- chore: replace rules_go with prebuilt buildifier by @alexeagle in #50
- Automate releases just by pushing a tag by @alexeagle in #55
New Contributors
- @harrysarson made their first contribution in #44
- @robbrit made their first contribution in #45
- @alexeagle made their first contribution in #50
Full Changelog: 0.2.1...0.3.0
0.2.1
0.790
is now default MyPy version, to ensure compatibility with Python 3.9
0.2.0
Changes
- Can now override the Python interpreter used in
py_repositories:py_deps.bzl
to install the MyPy dependencies. Use eitherpython_interpreter
(path) orpython_interpreter_target
(label).
Compatibility with rules_python 0.1.0
version 0.1.0 (handling newer rules_python API)
Fix: Handle empty py_library targets
Fixes an edge-case like the following, which in 0.0.9
failed when the Aspect was run on it:
py_library(
name = "foo",
srcs = [],
deps = [":bar"],
)
The error seen was:
The following files have no generating action:
test/empty_srcs_lib_dummy_out
test/empty_srcs_lib_mypy_exe
Better handling of generated python files
Previously this integration would fail with an error message including something like "darwin-fastbuild is not a valid Python package name"
if generated files were included in a py_*
target.
This was most prominently a blocker on using this integration with python_proto_library
, because the Protobuf-generated Python modules have a Bazel File.root
of bazel-out/<platform>/bin
, where <platform>
is a hyphenated string like "darwin-fastbuild".
Distribution using rules_pkgs, fix bug
TODO
Support py_binary's 'imports' attr
Fixes issue described in #8
Make integration less noisy in Bazel logs
0.0.6 Makes integration much less noisy in Bazel console logs