diff options
author | Alex Eagle <alexeagle@angular.io> | 2020-07-14 19:46:27 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-14 19:46:27 -0700 |
commit | 2c117e32362aa0bc237bbd01bc350b8de23800c1 (patch) | |
tree | bd01bb6af6f73d8373d2770f58c53d09445b6149 /internal_deps.bzl | |
parent | 32e964842b4139645417d0a8c24c807c163d7cfc (diff) | |
download | bazelbuild-rules_python-2c117e32362aa0bc237bbd01bc350b8de23800c1.tar.gz |
Remove mention and usage of Bazel Federation (#339)
It's currently a stalled project so it's not useful for us to direct new users there in our README.
Separately it is harder to develop on rules_python since it is currently not self-contained.
For example it's hard to find or adjust the version of rules_pkg without looking/editing in the federation repo.
Tony says this is an okay change: https://github.com/bazelbuild/bazel-federation/commit/63f9746afd4e8564d1033c529ce5065f69d6c7f9#commitcomment-40577834
Diffstat (limited to 'internal_deps.bzl')
-rw-r--r-- | internal_deps.bzl | 115 |
1 files changed, 99 insertions, 16 deletions
diff --git a/internal_deps.bzl b/internal_deps.bzl index 8e3df65..a0865cc 100644 --- a/internal_deps.bzl +++ b/internal_deps.bzl @@ -1,35 +1,118 @@ """Dependencies that are needed for rules_python tests and tools.""" -load("@bazel_federation//:repositories.bzl", "bazel_stardoc", "rules_pkg") -load("@bazel_federation//:third_party_repositories.bzl", "futures_2_whl", "futures_3_whl", "google_cloud_language_whl", "grpc_whl", "mock_whl", "subpar") +load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive", "http_file") +load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe") load("@rules_python//python:pip.bzl", "pip_import") def rules_python_internal_deps(): """Fetches all required dependencies for rules_python tests and tools.""" - bazel_stardoc() - subpar() + maybe( + http_archive, + name = "bazel_skylib", + strip_prefix = "bazel-skylib-1.0.2", + url = "https://github.com/bazelbuild/bazel-skylib/archive/1.0.2.zip", + type = "zip", + sha256 = "64ad2728ccdd2044216e4cec7815918b7bb3bb28c95b7e9d951f9d4eccb07625", + ) + + maybe( + http_archive, + name = "rules_pkg", + urls = [ + "https://mirror.bazel.build/github.com/bazelbuild/rules_pkg/releases/download/0.2.4/rules_pkg-0.2.4.tar.gz", + "https://github.com/bazelbuild/rules_pkg/releases/download/0.2.4/rules_pkg-0.2.4.tar.gz", + ], + sha256 = "4ba8f4ab0ff85f2484287ab06c0d871dcb31cc54d439457d28fd4ae14b18450a", + ) + + maybe( + http_archive, + name = "io_bazel_skydoc", + url = "https://github.com/bazelbuild/skydoc/archive/0.3.0.tar.gz", + sha256 = "c2d66a0cc7e25d857e480409a8004fdf09072a1bd564d6824441ab2f96448eea", + strip_prefix = "skydoc-0.3.0", + ) # Test data for WHL tool testing. - futures_2_whl() - futures_3_whl() - google_cloud_language_whl() - grpc_whl() - mock_whl() + maybe( + http_file, + name = "futures_2_2_0_whl", + downloaded_file_path = "futures-2.2.0-py2.py3-none-any.whl", + sha256 = "9fd22b354a4c4755ad8c7d161d93f5026aca4cfe999bd2e53168f14765c02cd6", + # From https://pypi.python.org/pypi/futures/2.2.0 + urls = [ + "https://mirror.bazel.build/pypi.python.org/packages/d7/1d/68874943aa37cf1c483fc61def813188473596043158faa6511c04a038b4/futures-2.2.0-py2.py3-none-any.whl", + "https://pypi.python.org/packages/d7/1d/68874943aa37cf1c483fc61def813188473596043158faa6511c04a038b4/futures-2.2.0-py2.py3-none-any.whl", + ], + ) - piptool() - examples() + maybe( + http_file, + name = "futures_3_1_1_whl", + downloaded_file_path = "futures-3.1.1-py2-none-any.whl", + sha256 = "c4884a65654a7c45435063e14ae85280eb1f111d94e542396717ba9828c4337f", + # From https://pypi.python.org/pypi/futures + urls = [ + "https://mirror.bazel.build/pypi.python.org/packages/a6/1c/72a18c8c7502ee1b38a604a5c5243aa8c2a64f4bba4e6631b1b8972235dd/futures-3.1.1-py2-none-any.whl", + "https://pypi.python.org/packages/a6/1c/72a18c8c7502ee1b38a604a5c5243aa8c2a64f4bba4e6631b1b8972235dd/futures-3.1.1-py2-none-any.whl", + ], + ) + + maybe( + http_file, + name = "google_cloud_language_whl", + downloaded_file_path = "google_cloud_language-0.29.0-py2.py3-none-any.whl", + sha256 = "a2dd34f0a0ebf5705dcbe34bd41199b1d0a55c4597d38ed045bd183361a561e9", + # From https://pypi.python.org/pypi/google-cloud-language + urls = [ + "https://mirror.bazel.build/pypi.python.org/packages/6e/86/cae57e4802e72d9e626ee5828ed5a646cf4016b473a4a022f1038dba3460/google_cloud_language-0.29.0-py2.py3-none-any.whl", + "https://pypi.python.org/packages/6e/86/cae57e4802e72d9e626ee5828ed5a646cf4016b473a4a022f1038dba3460/google_cloud_language-0.29.0-py2.py3-none-any.whl", + ], + ) - # For packaging and distribution - rules_pkg() + maybe( + http_file, + name = "grpc_whl", + downloaded_file_path = "grpcio-1.6.0-cp27-cp27m-manylinux1_i686.whl", + sha256 = "c232d6d168cb582e5eba8e1c0da8d64b54b041dd5ea194895a2fe76050916561", + # From https://pypi.python.org/pypi/grpcio/1.6.0 + urls = [ + "https://mirror.bazel.build/pypi.python.org/packages/c6/28/67651b4eabe616b27472c5518f9b2aa3f63beab8f62100b26f05ac428639/grpcio-1.6.0-cp27-cp27m-manylinux1_i686.whl", + "https://pypi.python.org/packages/c6/28/67651b4eabe616b27472c5518f9b2aa3f63beab8f62100b26f05ac428639/grpcio-1.6.0-cp27-cp27m-manylinux1_i686.whl", + ], + ) -def piptool(): - """Fetches all required dependencies for pip.""" - pip_import( + maybe( + http_file, + name = "mock_whl", + downloaded_file_path = "mock-2.0.0-py2.py3-none-any.whl", + sha256 = "5ce3c71c5545b472da17b72268978914d0252980348636840bd34a00b5cc96c1", + # From https://pypi.python.org/pypi/mock + urls = [ + "https://mirror.bazel.build/pypi.python.org/packages/e6/35/f187bdf23be87092bd0f1200d43d23076cee4d0dec109f195173fd3ebc79/mock-2.0.0-py2.py3-none-any.whl", + "https://pypi.python.org/packages/e6/35/f187bdf23be87092bd0f1200d43d23076cee4d0dec109f195173fd3ebc79/mock-2.0.0-py2.py3-none-any.whl", + ], + ) + + maybe( + git_repository, + name = "subpar", + remote = "https://github.com/google/subpar", + # tag = "2.0.0", + commit = "35bb9f0092f71ea56b742a520602da9b3638a24f", + shallow_since = "1557863961 -0400", + ) + + maybe( + pip_import, name = "piptool_deps", requirements = "@rules_python//python:requirements.txt", ) + examples() + def examples(): """Fetches all required dependencies for rules_python examples.""" pip_import( |