Commit Graph

3 Commits

Author SHA1 Message Date
Nicolette Prevost
fb21a44e2d Added expected hash for MarkupSafe for the MacOS platform with the M1 chip
Change-Id: I9dd480a5a0a62389b48a667f632e165a4e2add41
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/542298
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Nicolette Prevost <nicolettep@google.com>
Reviewed-by: Jorge Betancourt <jmbetancourt@google.com>
2022-05-19 17:54:32 +00:00
Jorge Betancourt
8a5aa6d7c0 add Mac hash for MarkupSafe requirements
Change-Id: Ibbc3abd2b84b4a77b90ceec8707776dbc238fa89
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/528442
Auto-Submit: Jorge Betancourt <jmbetancourt@google.com>
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Jorge Betancourt <jmbetancourt@google.com>
2022-04-13 15:39:27 +00:00
Kevin Lubick
54bd442fad [bazel] Use hermetic Python with jinja2+MarkupSafe
The file generation logic that dawn [1] uses to make some
source files requires jinja2, which also requires MarkupSafe.

The GN build handles this by specifying those repos in
DEPS, checking them out at a certain git hash, and then
providing them via a command line arg [2].

We do not have to do it this way in Bazel to have reproducible
builds. This CL specifies an exact version (verified by sha256)
of those two deps and then uses a hermetic version of
Python 3.9 to run all py_binary commands.

Previously, we would rely on the system Python (and installed
libraries). That happened to work on my machine, but not on
other machines without jinja2 and MarkupSafe installed. After
this CL, it should work on machines that do not have python
even installed.

I chose the same jinja2 version used by Dawn [3], which was
2.11.3. Then I chose the newest version of MarkupSafe that
was compatible with jinja2 (2.0.1).

If we have other python scripts that need external deps, we
should be able to specify them in the py_binary that needs
them and in requirements.txt. Then, the pip_install() step
in WORKSPACE.bazel will download them and make them available.

[1] https://dawn.googlesource.com/dawn.git/+/refs/heads/main/docs/dawn/overview.md
[2] https://dawn.googlesource.com/dawn.git/+/e45ff6a4b3c2f06dade68ec0f01ddc3bfd70c282/generator/generator_lib.gni#77
[3] ee69aa00ee

Change-Id: I3d0074f3003de179400e239e00107c34f35f4901
Bug: skia:12541
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/524217
Reviewed-by: Ben Wagner <bungeman@google.com>
Reviewed-by: Leandro Lovisolo <lovisolo@google.com>
2022-03-28 13:56:16 +00:00