blob: 503274c8ec621f083f780395a1f2d704a5c1240b [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)
Philipp Schrader0e19c602018-03-07 21:07:22 -080051load("//debian:packages.bzl", "download_packages", "generate_deb_tarball")
52
Brian Silverman6470f442018-08-05 12:08:16 -070053filegroup(
54 name = "matplotlib_patches",
55 srcs = [
56 "matplotlib_init.patch",
57 ],
58 visibility = ["@matplotlib//:__pkg__"],
59)
60
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -070061filegroup(
62 name = "python_shapely_patches",
63 srcs = [
64 "python_shapely_init.patch",
65 ],
66 visibility = ["@python_gtk//:__pkg__"],
67)
68
69filegroup(
70 name = "python_gi_patches",
71 srcs = [
72 "python_gi_init.patch",
73 ],
74 visibility = ["@python_gtk//:__pkg__"],
75)
76
77filegroup(
78 name = "python_geos_patches",
79 srcs = [
80 "python_geos.patch",
81 ],
82 visibility = ["@python_gtk//:__pkg__"],
83)
84
Philipp Schrader0e19c602018-03-07 21:07:22 -080085py_binary(
86 name = "download_packages",
87 srcs = [
88 "download_packages.py",
89 ],
90 default_python_version = "PY3",
91 main = "download_packages.py",
92 srcs_version = "PY2AND3",
93)
94
95download_packages(
96 name = "download_python_deps",
97 excludes = [
98 "libblas.so.3",
99 "liblapack.so.3",
100 ],
101 packages = [
102 "python-dev",
103 "python-numpy",
Brian Silverman6470f442018-08-05 12:08:16 -0700104 "python-scipy",
Philipp Schrader0e19c602018-03-07 21:07:22 -0800105 "python3-dev",
106 "python3-numpy",
Brian Silverman6470f442018-08-05 12:08:16 -0700107 "python3-scipy",
Philipp Schrader0e19c602018-03-07 21:07:22 -0800108 ],
109)
110
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800111download_packages(
112 name = "download_clang_deps",
113 excludes = [
114 "libblas.so.3",
115 ],
116 force_includes = [
117 "libc6",
118 "libc6-dev",
119 ],
120 packages = [
121 "clang-3.6",
122 "clang-format-3.6",
123 "gcc",
124 "gfortran",
125 ],
126)
127
Brian Silverman7bda6212018-08-05 11:42:11 -0700128download_packages(
129 name = "download_patch_deps",
130 packages = [
131 "patch",
132 ],
133)
134
Brian Silverman7297c0c2018-08-05 13:43:00 -0700135download_packages(
136 name = "download_pandoc_deps",
137 packages = [
138 "pandoc",
139 ],
140)
141
Brian Silverman4f6ba442018-08-05 14:34:58 -0700142download_packages(
143 name = "download_libusb_deps",
144 packages = [
145 "libusb-0.1-4",
146 "libusb-1.0-0",
147 "libusb-1.0-0-dev",
148 "libusb-dev",
149 ],
150)
151
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700152download_packages(
153 name = "download_mingw_compiler_deps",
154 packages = [
155 "g++-mingw-w64-x86-64",
156 ],
157)
158
Brian Silverman6470f442018-08-05 12:08:16 -0700159download_packages(
160 name = "download_patchelf_deps",
161 packages = [
162 "patchelf",
163 ],
164)
165
166download_packages(
167 name = "download_matplotlib_deps",
168 excludes = [
169 "python-dev",
170 "python-numpy",
171 "python-scipy",
172 "python3-dev",
173 "python3-numpy",
174 "python3-scipy",
175 "x11-common",
176 "fonts-freefont",
177 "python",
178 "libcups2",
179 ],
180 packages = [
181 "python-matplotlib",
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700182 "python-tk",
Brian Silverman6470f442018-08-05 12:08:16 -0700183 "python3-matplotlib",
184 ],
185)
186
Brian Silverman50b9ac02018-08-12 13:24:10 -0700187# This list was obtained by manually looking at the output from:
188# find bazel-out/../../../external/arm_frc_linux_gnueabi_repo/ -executable -type f -exec ldd {} + | sed 's/=>.*//g' | sort -u
189download_packages(
190 name = "download_arm_frc_gnueabi_deps",
191 packages = [
192 "libexpat1",
193 "libgmp10",
194 "libisl10",
195 "liblzma5",
196 "libmpc3",
197 "libmpfr4",
198 "libncurses5",
199 "libtinfo5",
200 "zlib1g",
201 ],
202)
203
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700204download_packages(
205 name = "download_python_gtk_deps",
206 excludes = [
207 "fonts-freefont",
208 "gsettings-backend",
209 "libpng-dev",
210 "libz-dev",
211 "python3-dev",
212 "python3",
213 ],
214 packages = [
215 "libgtk-3-dev",
216 "python3-cairo",
217 "python3-gi",
218 "python3-gi-cairo",
219 "python3-shapely",
220 ],
221)
222
Philipp Schrader0e19c602018-03-07 21:07:22 -0800223generate_deb_tarball(
224 name = "python",
225 files = python_debs,
226)
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800227
228generate_deb_tarball(
229 name = "clang_3p6",
230 files = clang_debs,
231)
Brian Silverman7bda6212018-08-05 11:42:11 -0700232
233generate_deb_tarball(
234 name = "patch",
235 files = patch_debs,
236)
Brian Silverman7297c0c2018-08-05 13:43:00 -0700237
238generate_deb_tarball(
Austin Schuh71f6fa72019-08-31 18:23:02 -0700239 name = "rsync",
240 files = rsync_debs,
241)
242
243generate_deb_tarball(
244 name = "ssh",
245 files = ssh_debs,
246)
247
248generate_deb_tarball(
Brian Silverman7297c0c2018-08-05 13:43:00 -0700249 name = "pandoc",
250 files = pandoc_debs,
251)
Brian Silverman4f6ba442018-08-05 14:34:58 -0700252
253generate_deb_tarball(
254 name = "libusb",
255 files = libusb_debs,
256)
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700257
258generate_deb_tarball(
259 name = "mingw_compiler",
260 files = mingw_compiler_debs,
261)
Brian Silverman6470f442018-08-05 12:08:16 -0700262
263generate_deb_tarball(
264 name = "patchelf",
265 files = patchelf_debs,
266)
267
268generate_deb_tarball(
269 name = "matplotlib",
270 files = matplotlib_debs,
271)
Brian Silverman50b9ac02018-08-12 13:24:10 -0700272
273generate_deb_tarball(
274 name = "arm_frc_gnueabi_deps",
275 files = arm_frc_gnueabi_deps_debs,
276)
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700277
278generate_deb_tarball(
279 name = "python_gtk",
280 files = python_gtk_debs,
281)