blob: 7ab6705f33600467383bea796be38a8c22b1e715 [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)
Philipp Schrader0e19c602018-03-07 21:07:22 -080043load("//debian:packages.bzl", "download_packages", "generate_deb_tarball")
44
Brian Silverman6470f442018-08-05 12:08:16 -070045filegroup(
46 name = "matplotlib_patches",
47 srcs = [
48 "matplotlib_init.patch",
49 ],
50 visibility = ["@matplotlib//:__pkg__"],
51)
52
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -070053filegroup(
54 name = "python_shapely_patches",
55 srcs = [
56 "python_shapely_init.patch",
57 ],
58 visibility = ["@python_gtk//:__pkg__"],
59)
60
61filegroup(
62 name = "python_gi_patches",
63 srcs = [
64 "python_gi_init.patch",
65 ],
66 visibility = ["@python_gtk//:__pkg__"],
67)
68
69filegroup(
70 name = "python_geos_patches",
71 srcs = [
72 "python_geos.patch",
73 ],
74 visibility = ["@python_gtk//:__pkg__"],
75)
76
Philipp Schrader0e19c602018-03-07 21:07:22 -080077py_binary(
78 name = "download_packages",
79 srcs = [
80 "download_packages.py",
81 ],
82 default_python_version = "PY3",
83 main = "download_packages.py",
84 srcs_version = "PY2AND3",
85)
86
87download_packages(
88 name = "download_python_deps",
89 excludes = [
90 "libblas.so.3",
91 "liblapack.so.3",
92 ],
93 packages = [
94 "python-dev",
95 "python-numpy",
Brian Silverman6470f442018-08-05 12:08:16 -070096 "python-scipy",
Philipp Schrader0e19c602018-03-07 21:07:22 -080097 "python3-dev",
98 "python3-numpy",
Brian Silverman6470f442018-08-05 12:08:16 -070099 "python3-scipy",
Philipp Schrader0e19c602018-03-07 21:07:22 -0800100 ],
101)
102
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800103download_packages(
104 name = "download_clang_deps",
105 excludes = [
106 "libblas.so.3",
107 ],
108 force_includes = [
109 "libc6",
110 "libc6-dev",
111 ],
112 packages = [
113 "clang-3.6",
114 "clang-format-3.6",
115 "gcc",
116 "gfortran",
117 ],
118)
119
Brian Silverman7bda6212018-08-05 11:42:11 -0700120download_packages(
121 name = "download_patch_deps",
122 packages = [
123 "patch",
124 ],
125)
126
Brian Silverman7297c0c2018-08-05 13:43:00 -0700127download_packages(
128 name = "download_pandoc_deps",
129 packages = [
130 "pandoc",
131 ],
132)
133
Brian Silverman4f6ba442018-08-05 14:34:58 -0700134download_packages(
135 name = "download_libusb_deps",
136 packages = [
137 "libusb-0.1-4",
138 "libusb-1.0-0",
139 "libusb-1.0-0-dev",
140 "libusb-dev",
141 ],
142)
143
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700144download_packages(
145 name = "download_mingw_compiler_deps",
146 packages = [
147 "g++-mingw-w64-x86-64",
148 ],
149)
150
Brian Silverman6470f442018-08-05 12:08:16 -0700151download_packages(
152 name = "download_patchelf_deps",
153 packages = [
154 "patchelf",
155 ],
156)
157
158download_packages(
159 name = "download_matplotlib_deps",
160 excludes = [
161 "python-dev",
162 "python-numpy",
163 "python-scipy",
164 "python3-dev",
165 "python3-numpy",
166 "python3-scipy",
167 "x11-common",
168 "fonts-freefont",
169 "python",
170 "libcups2",
171 ],
172 packages = [
173 "python-matplotlib",
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700174 "python-tk",
Brian Silverman6470f442018-08-05 12:08:16 -0700175 "python3-matplotlib",
176 ],
177)
178
Brian Silverman50b9ac02018-08-12 13:24:10 -0700179# This list was obtained by manually looking at the output from:
180# find bazel-out/../../../external/arm_frc_linux_gnueabi_repo/ -executable -type f -exec ldd {} + | sed 's/=>.*//g' | sort -u
181download_packages(
182 name = "download_arm_frc_gnueabi_deps",
183 packages = [
184 "libexpat1",
185 "libgmp10",
186 "libisl10",
187 "liblzma5",
188 "libmpc3",
189 "libmpfr4",
190 "libncurses5",
191 "libtinfo5",
192 "zlib1g",
193 ],
194)
195
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700196download_packages(
197 name = "download_python_gtk_deps",
198 excludes = [
199 "fonts-freefont",
200 "gsettings-backend",
201 "libpng-dev",
202 "libz-dev",
203 "python3-dev",
204 "python3",
205 ],
206 packages = [
207 "libgtk-3-dev",
208 "python3-cairo",
209 "python3-gi",
210 "python3-gi-cairo",
211 "python3-shapely",
212 ],
213)
214
Philipp Schrader0e19c602018-03-07 21:07:22 -0800215generate_deb_tarball(
216 name = "python",
217 files = python_debs,
218)
Philipp Schraderaedfc5c2018-03-10 19:32:30 -0800219
220generate_deb_tarball(
221 name = "clang_3p6",
222 files = clang_debs,
223)
Brian Silverman7bda6212018-08-05 11:42:11 -0700224
225generate_deb_tarball(
226 name = "patch",
227 files = patch_debs,
228)
Brian Silverman7297c0c2018-08-05 13:43:00 -0700229
230generate_deb_tarball(
231 name = "pandoc",
232 files = pandoc_debs,
233)
Brian Silverman4f6ba442018-08-05 14:34:58 -0700234
235generate_deb_tarball(
236 name = "libusb",
237 files = libusb_debs,
238)
Brian Silvermanb80dc9f2018-08-05 14:59:24 -0700239
240generate_deb_tarball(
241 name = "mingw_compiler",
242 files = mingw_compiler_debs,
243)
Brian Silverman6470f442018-08-05 12:08:16 -0700244
245generate_deb_tarball(
246 name = "patchelf",
247 files = patchelf_debs,
248)
249
250generate_deb_tarball(
251 name = "matplotlib",
252 files = matplotlib_debs,
253)
Brian Silverman50b9ac02018-08-12 13:24:10 -0700254
255generate_deb_tarball(
256 name = "arm_frc_gnueabi_deps",
257 files = arm_frc_gnueabi_deps_debs,
258)
Brian Silvermanb0ebf1d2018-10-17 23:36:40 -0700259
260generate_deb_tarball(
261 name = "python_gtk",
262 files = python_gtk_debs,
263)