blob: a052657938714aaf7065d2587c55b73449f8582e [file] [log] [blame]
Philipp Schrader0e19c602018-03-07 21:07:22 -08001package(default_visibility = ["//visibility:public"])
Austin Schuh55139fe2015-10-14 23:55:24 -07002
Philipp Schrader0e19c602018-03-07 21:07:22 -08003load(
4 "//debian:python.bzl",
5 python_debs = "files",
6)
Philipp Schraderaedfc5c2018-03-10 19:32:30 -08007load(
8 "//debian:clang.bzl",
9 clang_debs = "files",
10)
Brian Silverman7bda6212018-08-05 11:42:11 -070011load(
12 ":patch.bzl",
13 patch_debs = "files",
14)
Brian Silverman7297c0c2018-08-05 13:43:00 -070015load(
16 ":pandoc.bzl",
17 pandoc_debs = "files",
18)
Brian Silverman4f6ba442018-08-05 14:34:58 -070019load(
20 ":libusb.bzl",
21 libusb_debs = "files",
22)
Brian Silvermanb80dc9f2018-08-05 14:59:24 -070023load(
24 ":mingw_compiler.bzl",
25 mingw_compiler_debs = "files",
26)
Brian Silverman6470f442018-08-05 12:08:16 -070027load(
28 ":patchelf.bzl",
29 patchelf_debs = "files",
30)
31load(
32 ":matplotlib.bzl",
33 matplotlib_debs = "files",
34)
Brian Silverman50b9ac02018-08-12 13:24:10 -070035load(
36 ":arm_frc_gnueabi_deps.bzl",
37 arm_frc_gnueabi_deps_debs = "files",
38)
Philipp Schrader0e19c602018-03-07 21:07:22 -080039load("//debian:packages.bzl", "download_packages", "generate_deb_tarball")
40
Brian Silverman6470f442018-08-05 12:08:16 -070041filegroup(
42 name = "matplotlib_patches",
43 srcs = [
44 "matplotlib_init.patch",
45 ],
46 visibility = ["@matplotlib//:__pkg__"],
47)
48
Philipp Schrader0e19c602018-03-07 21:07:22 -080049py_binary(
50 name = "download_packages",
51 srcs = [
52 "download_packages.py",
53 ],
54 default_python_version = "PY3",
55 main = "download_packages.py",
56 srcs_version = "PY2AND3",
57)
58
59download_packages(
60 name = "download_python_deps",
61 excludes = [
62 "libblas.so.3",
63 "liblapack.so.3",
64 ],
65 packages = [
66 "python-dev",
67 "python-numpy",
Brian Silverman6470f442018-08-05 12:08:16 -070068 "python-scipy",
Philipp Schrader0e19c602018-03-07 21:07:22 -080069 "python3-dev",
70 "python3-numpy",
Brian Silverman6470f442018-08-05 12:08:16 -070071 "python3-scipy",
Philipp Schrader0e19c602018-03-07 21:07:22 -080072 ],
73)
74
Philipp Schraderaedfc5c2018-03-10 19:32:30 -080075download_packages(
76 name = "download_clang_deps",
77 excludes = [
78 "libblas.so.3",
79 ],
80 force_includes = [
81 "libc6",
82 "libc6-dev",
83 ],
84 packages = [
85 "clang-3.6",
86 "clang-format-3.6",
87 "gcc",
88 "gfortran",
89 ],
90)
91
Brian Silverman7bda6212018-08-05 11:42:11 -070092download_packages(
93 name = "download_patch_deps",
94 packages = [
95 "patch",
96 ],
97)
98
Brian Silverman7297c0c2018-08-05 13:43:00 -070099download_packages(
100 name = "download_pandoc_deps",
101 packages = [
102 "pandoc",
103 ],
104)
105
Brian Silverman4f6ba442018-08-05 14:34:58 -0700106download_packages(
107 name = "download_libusb_deps",
108 packages = [
109 "libusb-0.1-4",
110 "libusb-1.0-0",
111 "libusb-1.0-0-dev",
112 "libusb-dev",
113 ],
114)
115
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700116download_packages(
117 name = "download_mingw_compiler_deps",
118 packages = [
119 "g++-mingw-w64-x86-64",
120 ],
121)
122
Brian Silverman6470f442018-08-05 12:08:16 -0700123download_packages(
124 name = "download_patchelf_deps",
125 packages = [
126 "patchelf",
127 ],
128)
129
130download_packages(
131 name = "download_matplotlib_deps",
132 excludes = [
133 "python-dev",
134 "python-numpy",
135 "python-scipy",
136 "python3-dev",
137 "python3-numpy",
138 "python3-scipy",
139 "x11-common",
140 "fonts-freefont",
141 "python",
142 "libcups2",
143 ],
144 packages = [
145 "python-matplotlib",
146 "python3-matplotlib",
147 ],
148)
149
Brian Silverman50b9ac02018-08-12 13:24:10 -0700150# This list was obtained by manually looking at the output from:
151# find bazel-out/../../../external/arm_frc_linux_gnueabi_repo/ -executable -type f -exec ldd {} + | sed 's/=>.*//g' | sort -u
152download_packages(
153 name = "download_arm_frc_gnueabi_deps",
154 packages = [
155 "libexpat1",
156 "libgmp10",
157 "libisl10",
158 "liblzma5",
159 "libmpc3",
160 "libmpfr4",
161 "libncurses5",
162 "libtinfo5",
163 "zlib1g",
164 ],
165)
166
Philipp Schrader0e19c602018-03-07 21:07:22 -0800167generate_deb_tarball(
168 name = "python",
169 files = python_debs,
170)
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800171
172generate_deb_tarball(
173 name = "clang_3p6",
174 files = clang_debs,
175)
Brian Silverman7bda6212018-08-05 11:42:11 -0700176
177generate_deb_tarball(
178 name = "patch",
179 files = patch_debs,
180)
Brian Silverman7297c0c2018-08-05 13:43:00 -0700181
182generate_deb_tarball(
183 name = "pandoc",
184 files = pandoc_debs,
185)
Brian Silverman4f6ba442018-08-05 14:34:58 -0700186
187generate_deb_tarball(
188 name = "libusb",
189 files = libusb_debs,
190)
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700191
192generate_deb_tarball(
193 name = "mingw_compiler",
194 files = mingw_compiler_debs,
195)
Brian Silverman6470f442018-08-05 12:08:16 -0700196
197generate_deb_tarball(
198 name = "patchelf",
199 files = patchelf_debs,
200)
201
202generate_deb_tarball(
203 name = "matplotlib",
204 files = matplotlib_debs,
205)
Brian Silverman50b9ac02018-08-12 13:24:10 -0700206
207generate_deb_tarball(
208 name = "arm_frc_gnueabi_deps",
209 files = arm_frc_gnueabi_deps_debs,
210)