blob: 370c3883b23fc4539b016dbcd293f93fe25b8cb3 [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)
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -070039load(
40 ":python_gtk.bzl",
41 python_gtk_debs = "files",
42)
Austin Schuhc9bcd4b2018-10-20 18:39:38 -070043load(
44 ":ruby.bzl",
45 ruby_debs = "files",
46)
Philipp Schrader0e19c602018-03-07 21:07:22 -080047load("//debian:packages.bzl", "download_packages", "generate_deb_tarball")
48
Brian Silverman6470f442018-08-05 12:08:16 -070049filegroup(
50 name = "matplotlib_patches",
51 srcs = [
52 "matplotlib_init.patch",
53 ],
54 visibility = ["@matplotlib//:__pkg__"],
55)
56
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -070057filegroup(
58 name = "python_shapely_patches",
59 srcs = [
60 "python_shapely_init.patch",
61 ],
62 visibility = ["@python_gtk//:__pkg__"],
63)
64
65filegroup(
66 name = "python_gi_patches",
67 srcs = [
68 "python_gi_init.patch",
69 ],
70 visibility = ["@python_gtk//:__pkg__"],
71)
72
73filegroup(
74 name = "python_geos_patches",
75 srcs = [
76 "python_geos.patch",
77 ],
78 visibility = ["@python_gtk//:__pkg__"],
79)
80
Philipp Schrader0e19c602018-03-07 21:07:22 -080081py_binary(
82 name = "download_packages",
83 srcs = [
84 "download_packages.py",
85 ],
86 default_python_version = "PY3",
87 main = "download_packages.py",
88 srcs_version = "PY2AND3",
89)
90
91download_packages(
92 name = "download_python_deps",
93 excludes = [
94 "libblas.so.3",
95 "liblapack.so.3",
96 ],
97 packages = [
98 "python-dev",
99 "python-numpy",
Brian Silverman6470f442018-08-05 12:08:16 -0700100 "python-scipy",
Philipp Schrader0e19c602018-03-07 21:07:22 -0800101 "python3-dev",
102 "python3-numpy",
Brian Silverman6470f442018-08-05 12:08:16 -0700103 "python3-scipy",
Philipp Schrader0e19c602018-03-07 21:07:22 -0800104 ],
105)
106
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800107download_packages(
108 name = "download_clang_deps",
109 excludes = [
110 "libblas.so.3",
111 ],
112 force_includes = [
113 "libc6",
114 "libc6-dev",
115 ],
116 packages = [
117 "clang-3.6",
118 "clang-format-3.6",
119 "gcc",
120 "gfortran",
121 ],
122)
123
Brian Silverman7bda6212018-08-05 11:42:11 -0700124download_packages(
Austin Schuhc9bcd4b2018-10-20 18:39:38 -0700125 name = "download_ruby_deps",
126 excludes = [
127 "ca-certificates",
128 ],
129 packages = [
130 "ruby",
131 ],
132)
133
134download_packages(
Brian Silverman7bda6212018-08-05 11:42:11 -0700135 name = "download_patch_deps",
136 packages = [
137 "patch",
138 ],
139)
140
Brian Silverman7297c0c2018-08-05 13:43:00 -0700141download_packages(
142 name = "download_pandoc_deps",
143 packages = [
144 "pandoc",
145 ],
146)
147
Brian Silverman4f6ba442018-08-05 14:34:58 -0700148download_packages(
149 name = "download_libusb_deps",
150 packages = [
151 "libusb-0.1-4",
152 "libusb-1.0-0",
153 "libusb-1.0-0-dev",
154 "libusb-dev",
155 ],
156)
157
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700158download_packages(
159 name = "download_mingw_compiler_deps",
160 packages = [
161 "g++-mingw-w64-x86-64",
162 ],
163)
164
Brian Silverman6470f442018-08-05 12:08:16 -0700165download_packages(
166 name = "download_patchelf_deps",
167 packages = [
168 "patchelf",
169 ],
170)
171
172download_packages(
173 name = "download_matplotlib_deps",
174 excludes = [
175 "python-dev",
176 "python-numpy",
177 "python-scipy",
178 "python3-dev",
179 "python3-numpy",
180 "python3-scipy",
181 "x11-common",
182 "fonts-freefont",
183 "python",
184 "libcups2",
185 ],
186 packages = [
187 "python-matplotlib",
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700188 "python-tk",
Brian Silverman6470f442018-08-05 12:08:16 -0700189 "python3-matplotlib",
190 ],
191)
192
Brian Silverman50b9ac02018-08-12 13:24:10 -0700193# This list was obtained by manually looking at the output from:
194# find bazel-out/../../../external/arm_frc_linux_gnueabi_repo/ -executable -type f -exec ldd {} + | sed 's/=>.*//g' | sort -u
195download_packages(
196 name = "download_arm_frc_gnueabi_deps",
197 packages = [
198 "libexpat1",
199 "libgmp10",
200 "libisl10",
201 "liblzma5",
202 "libmpc3",
203 "libmpfr4",
204 "libncurses5",
205 "libtinfo5",
206 "zlib1g",
207 ],
208)
209
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700210download_packages(
211 name = "download_python_gtk_deps",
212 excludes = [
213 "fonts-freefont",
214 "gsettings-backend",
215 "libpng-dev",
216 "libz-dev",
217 "python3-dev",
218 "python3",
219 ],
220 packages = [
221 "libgtk-3-dev",
222 "python3-cairo",
223 "python3-gi",
224 "python3-gi-cairo",
225 "python3-shapely",
226 ],
227)
228
Philipp Schrader0e19c602018-03-07 21:07:22 -0800229generate_deb_tarball(
230 name = "python",
231 files = python_debs,
232)
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800233
234generate_deb_tarball(
235 name = "clang_3p6",
236 files = clang_debs,
237)
Brian Silverman7bda6212018-08-05 11:42:11 -0700238
239generate_deb_tarball(
240 name = "patch",
241 files = patch_debs,
242)
Brian Silverman7297c0c2018-08-05 13:43:00 -0700243
244generate_deb_tarball(
245 name = "pandoc",
246 files = pandoc_debs,
247)
Brian Silverman4f6ba442018-08-05 14:34:58 -0700248
249generate_deb_tarball(
250 name = "libusb",
251 files = libusb_debs,
252)
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700253
254generate_deb_tarball(
255 name = "mingw_compiler",
256 files = mingw_compiler_debs,
257)
Brian Silverman6470f442018-08-05 12:08:16 -0700258
259generate_deb_tarball(
260 name = "patchelf",
261 files = patchelf_debs,
262)
263
264generate_deb_tarball(
265 name = "matplotlib",
266 files = matplotlib_debs,
267)
Brian Silverman50b9ac02018-08-12 13:24:10 -0700268
269generate_deb_tarball(
270 name = "arm_frc_gnueabi_deps",
271 files = arm_frc_gnueabi_deps_debs,
272)
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700273
274generate_deb_tarball(
275 name = "python_gtk",
276 files = python_gtk_debs,
277)
Austin Schuhc9bcd4b2018-10-20 18:39:38 -0700278
279generate_deb_tarball(
280 name = "ruby",
281 files = ruby_debs,
282)