|
1 | 1 | load("@fbsource//xplat/executorch/build/runtime_wrapper.bzl", "runtime")
|
2 |
| -load("@prelude//rules.bzl", "prebuilt_python_library", "remote_file") |
3 |
| -load(":glob_defs.bzl", "subdir_glob") |
4 | 2 | load(":gflags.bzl", "define_gflags")
|
| 3 | +load(":glob_defs.bzl", "subdir_glob") |
| 4 | +load(":prebuilt_python_defs.bzl", "add_prebuilt_python_library_targets") |
5 | 5 |
|
6 | 6 | define_gflags()
|
7 | 7 |
|
8 |
| -# TODO(chenlai): linux-specific needs to be fixed |
9 |
| -remote_file( |
10 |
| - name = "pyyaml-download", |
11 |
| - url = "https://files.pythonhosted.org/packages/12/fc/a4d5a7554e0067677823f7265cb3ae22aed8a238560b5133b58cda252dad/PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", |
12 |
| - sha1 = "11aa9c5fe2d890b6a73212beadc7c8a4265ebc39", |
13 |
| - out = "pyyaml.whl", |
14 |
| -) |
15 |
| - |
16 |
| -prebuilt_python_library( |
17 |
| - name = "pyyaml", |
18 |
| - binary_src = ":pyyaml-download", |
19 |
| - visibility = ["PUBLIC"], |
20 |
| - deps = [":pyyaml-download"], |
21 |
| -) |
22 |
| - |
23 |
| -# TODO(chenlai): linux-specific needs to be fixed |
24 |
| -remote_file( |
25 |
| - name = "typing-extensions-download", |
26 |
| - url = "https://files.pythonhosted.org/packages/75/e1/932e06004039dd670c9d5e1df0cd606bf46e29a28e65d5bb28e894ea29c9/typing_extensions-4.2.0-py3-none-any.whl", |
27 |
| - sha1 = "ff0849420e94f425818bff5d0f25e3cdfaba8601", |
28 |
| - out = "typing_extensions-4.2.0-py3-none-any.whl", |
29 |
| -) |
| 8 | +prebuilt_python_library_defs = { |
| 9 | + "prettytable": { |
| 10 | + "additional_deps": [":wcwidth"], |
| 11 | + "out": "prettytable-3.8.0-py3-none-any.whl", |
| 12 | + "sha1": "22a8347abd5a72e4ea8d5f5bb2956d956148e6fa", |
| 13 | + "url": "https://files.pythonhosted.org/packages/25/1e/4c284713b092ec384fad4399452f43f6446ad9aabc9c0b3c3c0920cc53b6/prettytable-3.8.0-py3-none-any.whl", |
| 14 | + }, |
| 15 | + "pyyaml": { |
| 16 | + "out": "pyyaml.whl", |
| 17 | + "sha1": "11aa9c5fe2d890b6a73212beadc7c8a4265ebc39", |
| 18 | + "url": "https://files.pythonhosted.org/packages/12/fc/a4d5a7554e0067677823f7265cb3ae22aed8a238560b5133b58cda252dad/PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", |
| 19 | + }, |
| 20 | + "typing-extensions": { |
| 21 | + "out": "typing_extensions-4.2.0-py3-none-any.whl", |
| 22 | + "sha1": "ff0849420e94f425818bff5d0f25e3cdfaba8601", |
| 23 | + "url": "https://files.pythonhosted.org/packages/75/e1/932e06004039dd670c9d5e1df0cd606bf46e29a28e65d5bb28e894ea29c9/typing_extensions-4.2.0-py3-none-any.whl", |
| 24 | + }, |
| 25 | + "wcwidth": { |
| 26 | + "out": "wcwidth-0.1.5-py2.py3-none-any.whl", |
| 27 | + "sha1": "f132a6fdff56d1d8bf572f00ef6985a327784bbd", |
| 28 | + "url": "https://files.pythonhosted.org/packages/8b/30/f46badba94cedcd5ceb5918a7c5a34f3a1b9e902e045b7d8d39c1db3d99a/wcwidth-0.1.5-py2.py3-none-any.whl", |
| 29 | + }, |
| 30 | +} |
30 | 31 |
|
31 |
| -prebuilt_python_library( |
32 |
| - name = "typing-extensions", |
33 |
| - binary_src = ":typing-extensions-download", |
34 |
| - visibility = ["PUBLIC"], |
35 |
| - deps = [":typing-extensions-download"], |
36 |
| -) |
| 32 | +add_prebuilt_python_library_targets(prebuilt_python_library_defs) |
37 | 33 |
|
38 | 34 | runtime.python_library(
|
39 | 35 | name = "torchgen",
|
|
0 commit comments