blob: 0cb12e7c9b4bbb294081a7c81d1be75ae0c9bc28 [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 = [
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",
185 ],
186)
187
Brian Silverman50b9ac02018-08-12 13:24:10 -0700188# This list was obtained by manually looking at the output from:
189# find bazel-out/../../../external/arm_frc_linux_gnueabi_repo/ -executable -type f -exec ldd {} + | sed 's/=>.*//g' | sort -u
190download_packages(
191 name = "download_arm_frc_gnueabi_deps",
192 packages = [
193 "libexpat1",
194 "libgmp10",
195 "libisl10",
196 "liblzma5",
197 "libmpc3",
198 "libmpfr4",
199 "libncurses5",
200 "libtinfo5",
201 "zlib1g",
202 ],
203)
204
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700205download_packages(
206 name = "download_python_gtk_deps",
207 excludes = [
208 "fonts-freefont",
209 "gsettings-backend",
210 "libpng-dev",
211 "libz-dev",
212 "python3-dev",
213 "python3",
214 ],
215 packages = [
216 "libgtk-3-dev",
217 "python3-cairo",
218 "python3-gi",
219 "python3-gi-cairo",
220 "python3-shapely",
221 ],
222)
223
Philipp Schrader0e19c602018-03-07 21:07:22 -0800224generate_deb_tarball(
225 name = "python",
226 files = python_debs,
227)
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800228
229generate_deb_tarball(
James Kuszmaul3ae42262019-11-08 12:33:41 -0800230 name = "clang_6p0",
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800231 files = clang_debs,
232)
Brian Silverman7bda6212018-08-05 11:42:11 -0700233
234generate_deb_tarball(
235 name = "patch",
236 files = patch_debs,
237)
Brian Silverman7297c0c2018-08-05 13:43:00 -0700238
239generate_deb_tarball(
Austin Schuh71f6fa72019-08-31 18:23:02 -0700240 name = "rsync",
241 files = rsync_debs,
242)
243
244generate_deb_tarball(
245 name = "ssh",
246 files = ssh_debs,
247)
248
249generate_deb_tarball(
Brian Silverman7297c0c2018-08-05 13:43:00 -0700250 name = "pandoc",
251 files = pandoc_debs,
252)
Brian Silverman4f6ba442018-08-05 14:34:58 -0700253
254generate_deb_tarball(
255 name = "libusb",
256 files = libusb_debs,
257)
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700258
259generate_deb_tarball(
260 name = "mingw_compiler",
261 files = mingw_compiler_debs,
262)
Brian Silverman6470f442018-08-05 12:08:16 -0700263
264generate_deb_tarball(
265 name = "patchelf",
266 files = patchelf_debs,
267)
268
269generate_deb_tarball(
270 name = "matplotlib",
271 files = matplotlib_debs,
272)
Brian Silverman50b9ac02018-08-12 13:24:10 -0700273
274generate_deb_tarball(
275 name = "arm_frc_gnueabi_deps",
276 files = arm_frc_gnueabi_deps_debs,
277)
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700278
279generate_deb_tarball(
280 name = "python_gtk",
281 files = python_gtk_debs,
282)