blob: 9b7ad4d92ec3dd416919ef4555c150e774e4c0a4 [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 ],
James Kuszmaul910f92b2020-01-01 15:30:38 -080058 visibility = ["@matplotlib_repo//:__pkg__"],
Brian Silverman6470f442018-08-05 12:08:16 -070059)
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 = [
James Kuszmaul3ae42262019-11-08 12:33:41 -0800114 "lib32stdc++6",
115 "libstdc++6",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800116 ],
117 force_includes = [
118 "libc6",
119 "libc6-dev",
120 ],
121 packages = [
James Kuszmaul3ae42262019-11-08 12:33:41 -0800122 "clang-6.0",
123 "clang-format-6.0",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800124 "gcc",
125 "gfortran",
126 ],
127)
128
Brian Silverman7bda6212018-08-05 11:42:11 -0700129download_packages(
130 name = "download_patch_deps",
131 packages = [
132 "patch",
133 ],
134)
135
Brian Silverman7297c0c2018-08-05 13:43:00 -0700136download_packages(
137 name = "download_pandoc_deps",
138 packages = [
139 "pandoc",
140 ],
141)
142
Brian Silverman4f6ba442018-08-05 14:34:58 -0700143download_packages(
144 name = "download_libusb_deps",
145 packages = [
146 "libusb-0.1-4",
147 "libusb-1.0-0",
148 "libusb-1.0-0-dev",
149 "libusb-dev",
150 ],
151)
152
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700153download_packages(
154 name = "download_mingw_compiler_deps",
155 packages = [
156 "g++-mingw-w64-x86-64",
157 ],
158)
159
Brian Silverman6470f442018-08-05 12:08:16 -0700160download_packages(
161 name = "download_patchelf_deps",
162 packages = [
163 "patchelf",
164 ],
165)
166
167download_packages(
168 name = "download_matplotlib_deps",
169 excludes = [
170 "python-dev",
171 "python-numpy",
172 "python-scipy",
173 "python3-dev",
174 "python3-numpy",
175 "python3-scipy",
176 "x11-common",
177 "fonts-freefont",
178 "python",
179 "libcups2",
180 ],
181 packages = [
182 "python-matplotlib",
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700183 "python-tk",
Brian Silverman6470f442018-08-05 12:08:16 -0700184 "python3-matplotlib",
James Kuszmaul910f92b2020-01-01 15:30:38 -0800185 "python3-tk",
Brian Silverman6470f442018-08-05 12:08:16 -0700186 ],
187)
188
Brian Silverman50b9ac02018-08-12 13:24:10 -0700189# This list was obtained by manually looking at the output from:
190# find bazel-out/../../../external/arm_frc_linux_gnueabi_repo/ -executable -type f -exec ldd {} + | sed 's/=>.*//g' | sort -u
191download_packages(
192 name = "download_arm_frc_gnueabi_deps",
193 packages = [
194 "libexpat1",
195 "libgmp10",
196 "libisl10",
197 "liblzma5",
198 "libmpc3",
199 "libmpfr4",
200 "libncurses5",
201 "libtinfo5",
202 "zlib1g",
203 ],
204)
205
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700206download_packages(
207 name = "download_python_gtk_deps",
208 excludes = [
209 "fonts-freefont",
210 "gsettings-backend",
211 "libpng-dev",
212 "libz-dev",
213 "python3-dev",
214 "python3",
215 ],
216 packages = [
217 "libgtk-3-dev",
218 "python3-cairo",
219 "python3-gi",
220 "python3-gi-cairo",
221 "python3-shapely",
222 ],
223)
224
Philipp Schrader0e19c602018-03-07 21:07:22 -0800225generate_deb_tarball(
226 name = "python",
227 files = python_debs,
228)
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800229
230generate_deb_tarball(
James Kuszmaul3ae42262019-11-08 12:33:41 -0800231 name = "clang_6p0",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800232 files = clang_debs,
233)
Brian Silverman7bda6212018-08-05 11:42:11 -0700234
235generate_deb_tarball(
236 name = "patch",
237 files = patch_debs,
238)
Brian Silverman7297c0c2018-08-05 13:43:00 -0700239
240generate_deb_tarball(
Austin Schuh71f6fa72019-08-31 18:23:02 -0700241 name = "rsync",
242 files = rsync_debs,
243)
244
245generate_deb_tarball(
246 name = "ssh",
247 files = ssh_debs,
248)
249
250generate_deb_tarball(
Brian Silverman7297c0c2018-08-05 13:43:00 -0700251 name = "pandoc",
252 files = pandoc_debs,
253)
Brian Silverman4f6ba442018-08-05 14:34:58 -0700254
255generate_deb_tarball(
256 name = "libusb",
257 files = libusb_debs,
258)
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700259
260generate_deb_tarball(
261 name = "mingw_compiler",
262 files = mingw_compiler_debs,
263)
Brian Silverman6470f442018-08-05 12:08:16 -0700264
265generate_deb_tarball(
266 name = "patchelf",
267 files = patchelf_debs,
268)
269
270generate_deb_tarball(
271 name = "matplotlib",
272 files = matplotlib_debs,
273)
Brian Silverman50b9ac02018-08-12 13:24:10 -0700274
275generate_deb_tarball(
276 name = "arm_frc_gnueabi_deps",
277 files = arm_frc_gnueabi_deps_debs,
278)
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700279
280generate_deb_tarball(
281 name = "python_gtk",
282 files = python_gtk_debs,
283)