blob: f7d31139402361b80eacce9d852d61fc28057d81 [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(
Austin Schuh71f6fa72019-08-31 18:23:02 -070016 ":rsync.bzl",
17 rsync_debs = "files",
18)
19load(
20 ":ssh.bzl",
21 ssh_debs = "files",
22)
23load(
Brian Silverman7297c0c2018-08-05 13:43:00 -070024 ":pandoc.bzl",
25 pandoc_debs = "files",
26)
Brian Silverman4f6ba442018-08-05 14:34:58 -070027load(
28 ":libusb.bzl",
29 libusb_debs = "files",
30)
Brian Silvermanb80dc9f2018-08-05 14:59:24 -070031load(
32 ":mingw_compiler.bzl",
33 mingw_compiler_debs = "files",
34)
Brian Silverman6470f442018-08-05 12:08:16 -070035load(
36 ":patchelf.bzl",
37 patchelf_debs = "files",
38)
39load(
40 ":matplotlib.bzl",
41 matplotlib_debs = "files",
42)
Brian Silverman50b9ac02018-08-12 13:24:10 -070043load(
44 ":arm_frc_gnueabi_deps.bzl",
45 arm_frc_gnueabi_deps_debs = "files",
46)
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -070047load(
48 ":python_gtk.bzl",
49 python_gtk_debs = "files",
50)
Austin Schuhc9bcd4b2018-10-20 18:39:38 -070051load(
52 ":ruby.bzl",
53 ruby_debs = "files",
54)
Philipp Schrader0e19c602018-03-07 21:07:22 -080055load("//debian:packages.bzl", "download_packages", "generate_deb_tarball")
56
Brian Silverman6470f442018-08-05 12:08:16 -070057filegroup(
58 name = "matplotlib_patches",
59 srcs = [
60 "matplotlib_init.patch",
61 ],
62 visibility = ["@matplotlib//:__pkg__"],
63)
64
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -070065filegroup(
66 name = "python_shapely_patches",
67 srcs = [
68 "python_shapely_init.patch",
69 ],
70 visibility = ["@python_gtk//:__pkg__"],
71)
72
73filegroup(
74 name = "python_gi_patches",
75 srcs = [
76 "python_gi_init.patch",
77 ],
78 visibility = ["@python_gtk//:__pkg__"],
79)
80
81filegroup(
82 name = "python_geos_patches",
83 srcs = [
84 "python_geos.patch",
85 ],
86 visibility = ["@python_gtk//:__pkg__"],
87)
88
Philipp Schrader0e19c602018-03-07 21:07:22 -080089py_binary(
90 name = "download_packages",
91 srcs = [
92 "download_packages.py",
93 ],
94 default_python_version = "PY3",
95 main = "download_packages.py",
96 srcs_version = "PY2AND3",
97)
98
99download_packages(
100 name = "download_python_deps",
101 excludes = [
102 "libblas.so.3",
103 "liblapack.so.3",
104 ],
105 packages = [
106 "python-dev",
107 "python-numpy",
Brian Silverman6470f442018-08-05 12:08:16 -0700108 "python-scipy",
Philipp Schrader0e19c602018-03-07 21:07:22 -0800109 "python3-dev",
110 "python3-numpy",
Brian Silverman6470f442018-08-05 12:08:16 -0700111 "python3-scipy",
Philipp Schrader0e19c602018-03-07 21:07:22 -0800112 ],
113)
114
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800115download_packages(
116 name = "download_clang_deps",
117 excludes = [
118 "libblas.so.3",
119 ],
120 force_includes = [
121 "libc6",
122 "libc6-dev",
123 ],
124 packages = [
125 "clang-3.6",
126 "clang-format-3.6",
127 "gcc",
128 "gfortran",
129 ],
130)
131
Brian Silverman7bda6212018-08-05 11:42:11 -0700132download_packages(
Austin Schuhc9bcd4b2018-10-20 18:39:38 -0700133 name = "download_ruby_deps",
134 excludes = [
135 "ca-certificates",
136 ],
137 packages = [
138 "ruby",
139 ],
140)
141
142download_packages(
Brian Silverman7bda6212018-08-05 11:42:11 -0700143 name = "download_patch_deps",
144 packages = [
145 "patch",
146 ],
147)
148
Brian Silverman7297c0c2018-08-05 13:43:00 -0700149download_packages(
150 name = "download_pandoc_deps",
151 packages = [
152 "pandoc",
153 ],
154)
155
Brian Silverman4f6ba442018-08-05 14:34:58 -0700156download_packages(
157 name = "download_libusb_deps",
158 packages = [
159 "libusb-0.1-4",
160 "libusb-1.0-0",
161 "libusb-1.0-0-dev",
162 "libusb-dev",
163 ],
164)
165
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700166download_packages(
167 name = "download_mingw_compiler_deps",
168 packages = [
169 "g++-mingw-w64-x86-64",
170 ],
171)
172
Brian Silverman6470f442018-08-05 12:08:16 -0700173download_packages(
174 name = "download_patchelf_deps",
175 packages = [
176 "patchelf",
177 ],
178)
179
180download_packages(
181 name = "download_matplotlib_deps",
182 excludes = [
183 "python-dev",
184 "python-numpy",
185 "python-scipy",
186 "python3-dev",
187 "python3-numpy",
188 "python3-scipy",
189 "x11-common",
190 "fonts-freefont",
191 "python",
192 "libcups2",
193 ],
194 packages = [
195 "python-matplotlib",
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700196 "python-tk",
Brian Silverman6470f442018-08-05 12:08:16 -0700197 "python3-matplotlib",
198 ],
199)
200
Brian Silverman50b9ac02018-08-12 13:24:10 -0700201# This list was obtained by manually looking at the output from:
202# find bazel-out/../../../external/arm_frc_linux_gnueabi_repo/ -executable -type f -exec ldd {} + | sed 's/=>.*//g' | sort -u
203download_packages(
204 name = "download_arm_frc_gnueabi_deps",
205 packages = [
206 "libexpat1",
207 "libgmp10",
208 "libisl10",
209 "liblzma5",
210 "libmpc3",
211 "libmpfr4",
212 "libncurses5",
213 "libtinfo5",
214 "zlib1g",
215 ],
216)
217
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700218download_packages(
219 name = "download_python_gtk_deps",
220 excludes = [
221 "fonts-freefont",
222 "gsettings-backend",
223 "libpng-dev",
224 "libz-dev",
225 "python3-dev",
226 "python3",
227 ],
228 packages = [
229 "libgtk-3-dev",
230 "python3-cairo",
231 "python3-gi",
232 "python3-gi-cairo",
233 "python3-shapely",
234 ],
235)
236
Philipp Schrader0e19c602018-03-07 21:07:22 -0800237generate_deb_tarball(
238 name = "python",
239 files = python_debs,
240)
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800241
242generate_deb_tarball(
243 name = "clang_3p6",
244 files = clang_debs,
245)
Brian Silverman7bda6212018-08-05 11:42:11 -0700246
247generate_deb_tarball(
248 name = "patch",
249 files = patch_debs,
250)
Brian Silverman7297c0c2018-08-05 13:43:00 -0700251
252generate_deb_tarball(
Austin Schuh71f6fa72019-08-31 18:23:02 -0700253 name = "rsync",
254 files = rsync_debs,
255)
256
257generate_deb_tarball(
258 name = "ssh",
259 files = ssh_debs,
260)
261
262generate_deb_tarball(
Brian Silverman7297c0c2018-08-05 13:43:00 -0700263 name = "pandoc",
264 files = pandoc_debs,
265)
Brian Silverman4f6ba442018-08-05 14:34:58 -0700266
267generate_deb_tarball(
268 name = "libusb",
269 files = libusb_debs,
270)
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700271
272generate_deb_tarball(
273 name = "mingw_compiler",
274 files = mingw_compiler_debs,
275)
Brian Silverman6470f442018-08-05 12:08:16 -0700276
277generate_deb_tarball(
278 name = "patchelf",
279 files = patchelf_debs,
280)
281
282generate_deb_tarball(
283 name = "matplotlib",
284 files = matplotlib_debs,
285)
Brian Silverman50b9ac02018-08-12 13:24:10 -0700286
287generate_deb_tarball(
288 name = "arm_frc_gnueabi_deps",
289 files = arm_frc_gnueabi_deps_debs,
290)
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700291
292generate_deb_tarball(
293 name = "python_gtk",
294 files = python_gtk_debs,
295)
Austin Schuhc9bcd4b2018-10-20 18:39:38 -0700296
297generate_deb_tarball(
298 name = "ruby",
299 files = ruby_debs,
300)