|
14 | 14 |
|
15 | 15 | workspace(name = "rules_python")
|
16 | 16 |
|
17 |
| -load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") |
18 |
| -load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file") |
19 |
| - |
20 |
| -################################# |
21 |
| -# Stardoc and its dependencies. # |
22 |
| -################################# |
23 |
| - |
24 |
| -# Initialization taken from: |
25 |
| -# https://skydoc.bazel.build/docs/getting_started_stardoc.html |
26 |
| - |
27 |
| -git_repository( |
28 |
| - name = "io_bazel_skydoc", |
29 |
| - remote = "https://github.com/bazelbuild/skydoc.git", |
30 |
| - tag = "0.3.0", |
31 |
| -) |
32 |
| - |
33 |
| -load("@io_bazel_skydoc//:setup.bzl", "skydoc_repositories") |
34 |
| -skydoc_repositories() |
35 |
| - |
36 |
| -load("@io_bazel_rules_sass//:package.bzl", "rules_sass_dependencies") |
37 |
| -rules_sass_dependencies() |
38 |
| - |
39 |
| -load("@build_bazel_rules_nodejs//:defs.bzl", "node_repositories") |
40 |
| -node_repositories() |
41 |
| - |
42 |
| -load("@io_bazel_rules_sass//:defs.bzl", "sass_repositories") |
43 |
| -sass_repositories() |
44 |
| - |
45 |
| -########################################## |
46 |
| -# Requirements for building our piptool. # |
47 |
| -########################################## |
48 |
| - |
49 |
| -load("//python:pip.bzl", "pip_import") |
50 |
| - |
51 |
| -pip_import( |
52 |
| - name = "piptool_deps", |
53 |
| - requirements = "//python:requirements.txt", |
54 |
| -) |
55 |
| - |
56 |
| -load( |
57 |
| - "@piptool_deps//:requirements.bzl", |
58 |
| - _piptool_install = "pip_install", |
59 |
| -) |
60 |
| - |
61 |
| -_piptool_install() |
62 |
| - |
63 |
| -git_repository( |
64 |
| - name = "subpar", |
65 |
| - remote = "https://github.com/google/subpar", |
66 |
| - commit = "2917d275ee27d7935f7809413c74eddf71a46e5c", # 2019-08-02 |
67 |
| -) |
68 |
| - |
69 |
| -################################### |
70 |
| -# Test data for WHL tool testing. # |
71 |
| -################################### |
72 |
| - |
73 |
| -http_file( |
74 |
| - name = "grpc_whl", |
75 |
| - downloaded_file_path = "grpcio-1.6.0-cp27-cp27m-manylinux1_i686.whl", |
76 |
| - sha256 = "c232d6d168cb582e5eba8e1c0da8d64b54b041dd5ea194895a2fe76050916561", |
77 |
| - # From https://pypi.python.org/pypi/grpcio/1.6.0 |
78 |
| - urls = [("https://pypi.python.org/packages/c6/28/" + |
79 |
| - "67651b4eabe616b27472c5518f9b2aa3f63beab8f62100b26f05ac428639/" + |
80 |
| - "grpcio-1.6.0-cp27-cp27m-manylinux1_i686.whl")], |
81 |
| -) |
82 |
| - |
83 |
| -http_file( |
84 |
| - name = "futures_3_1_1_whl", |
85 |
| - downloaded_file_path = "futures-3.1.1-py2-none-any.whl", |
86 |
| - sha256 = "c4884a65654a7c45435063e14ae85280eb1f111d94e542396717ba9828c4337f", |
87 |
| - # From https://pypi.python.org/pypi/futures |
88 |
| - urls = [("https://pypi.python.org/packages/a6/1c/" + |
89 |
| - "72a18c8c7502ee1b38a604a5c5243aa8c2a64f4bba4e6631b1b8972235dd/" + |
90 |
| - "futures-3.1.1-py2-none-any.whl")], |
91 |
| -) |
92 |
| - |
93 |
| -http_file( |
94 |
| - name = "futures_2_2_0_whl", |
95 |
| - downloaded_file_path = "futures-2.2.0-py2.py3-none-any.whl", |
96 |
| - sha256 = "9fd22b354a4c4755ad8c7d161d93f5026aca4cfe999bd2e53168f14765c02cd6", |
97 |
| - # From https://pypi.python.org/pypi/futures/2.2.0 |
98 |
| - urls = [("https://pypi.python.org/packages/d7/1d/" + |
99 |
| - "68874943aa37cf1c483fc61def813188473596043158faa6511c04a038b4/" + |
100 |
| - "futures-2.2.0-py2.py3-none-any.whl")], |
101 |
| -) |
102 |
| - |
103 |
| -http_file( |
104 |
| - name = "mock_whl", |
105 |
| - downloaded_file_path = "mock-2.0.0-py2.py3-none-any.whl", |
106 |
| - sha256 = "5ce3c71c5545b472da17b72268978914d0252980348636840bd34a00b5cc96c1", |
107 |
| - # From https://pypi.python.org/pypi/mock |
108 |
| - urls = [("https://pypi.python.org/packages/e6/35/" + |
109 |
| - "f187bdf23be87092bd0f1200d43d23076cee4d0dec109f195173fd3ebc79/" + |
110 |
| - "mock-2.0.0-py2.py3-none-any.whl")], |
111 |
| -) |
112 |
| - |
113 |
| -http_file( |
114 |
| - name = "google_cloud_language_whl", |
115 |
| - downloaded_file_path = "google_cloud_language-0.29.0-py2.py3-none-any.whl", |
116 |
| - sha256 = "a2dd34f0a0ebf5705dcbe34bd41199b1d0a55c4597d38ed045bd183361a561e9", |
117 |
| - # From https://pypi.python.org/pypi/google-cloud-language |
118 |
| - urls = [("https://pypi.python.org/packages/6e/86/" + |
119 |
| - "cae57e4802e72d9e626ee5828ed5a646cf4016b473a4a022f1038dba3460/" + |
120 |
| - "google_cloud_language-0.29.0-py2.py3-none-any.whl")], |
121 |
| -) |
122 |
| - |
123 |
| -######################### |
124 |
| -# Imports for examples. # |
125 |
| -######################### |
126 |
| - |
127 |
| -pip_import( |
128 |
| - name = "examples_helloworld", |
129 |
| - requirements = "//examples/helloworld:requirements.txt", |
130 |
| -) |
131 |
| - |
132 |
| -load( |
133 |
| - "@examples_helloworld//:requirements.bzl", |
134 |
| - _helloworld_install = "pip_install", |
135 |
| -) |
136 |
| - |
137 |
| -_helloworld_install() |
138 |
| - |
139 |
| -pip_import( |
140 |
| - name = "examples_version", |
141 |
| - requirements = "//examples/version:requirements.txt", |
142 |
| -) |
143 |
| - |
144 |
| -load( |
145 |
| - "@examples_version//:requirements.bzl", |
146 |
| - _version_install = "pip_install", |
| 17 | +load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") |
| 18 | +http_archive( |
| 19 | + name = "bazel_federation", |
| 20 | + url = "https://github.com/bazelbuild/bazel-federation/archive/4da9b5f83ffae17613fa025a0701fa9db9350d41.zip", |
| 21 | + sha256 = "5b1cf980e327a8f30fc81c00c04007c543e17c09ed612fb645753936de790ed7", |
| 22 | + strip_prefix = "bazel-federation-4da9b5f83ffae17613fa025a0701fa9db9350d41", |
| 23 | + type = "zip", |
147 | 24 | )
|
148 | 25 |
|
149 |
| -_version_install() |
| 26 | +load("@bazel_federation//:repositories.bzl", "rules_python_deps") |
| 27 | +rules_python_deps() |
150 | 28 |
|
151 |
| -pip_import( |
152 |
| - name = "examples_boto", |
153 |
| - requirements = "//examples/boto:requirements.txt", |
154 |
| -) |
| 29 | +load("@bazel_federation//setup:rules_python.bzl", "rules_python_setup") |
| 30 | +rules_python_setup(use_pip=True) |
155 | 31 |
|
156 |
| -load( |
157 |
| - "@examples_boto//:requirements.bzl", |
158 |
| - _boto_install = "pip_install", |
159 |
| -) |
160 |
| - |
161 |
| -_boto_install() |
162 |
| - |
163 |
| -pip_import( |
164 |
| - name = "examples_extras", |
165 |
| - requirements = "//examples/extras:requirements.txt", |
166 |
| -) |
167 |
| - |
168 |
| -load( |
169 |
| - "@examples_extras//:requirements.bzl", |
170 |
| - _extras_install = "pip_install", |
171 |
| -) |
| 32 | +load("//:internal_deps.bzl", "rules_python_internal_deps") |
| 33 | +rules_python_internal_deps() |
172 | 34 |
|
173 |
| -_extras_install() |
| 35 | +load("//:internal_setup.bzl", "rules_python_internal_setup") |
| 36 | +rules_python_internal_setup() |
0 commit comments