diff options
author | Florian Müllner <fmuellner@gnome.org> | 2020-12-29 00:01:03 +0100 |
---|---|---|
committer | Florian Müllner <fmuellner@gnome.org> | 2020-12-29 00:40:47 +0100 |
commit | eafbfdfa077f13bb07fe837bc27ad53b2fd19af5 (patch) | |
tree | df534cd5e1e47253fdeb04f670d94fc8fb43609d /meson | |
parent | 9ef9a5ff8a147c5ef90ffce86468f1ccf8f94a6e (diff) | |
download | gnome-shell-eafbfdfa077f13bb07fe837bc27ad53b2fd19af5.tar.gz |
theme: Pre-generate stylesheets as well
Since commit 9ef9a5ff8a, man pages are generated at dist time to reduce
build dependencies when building from a released tarball.
Do the same for the stylesheets to also remove the sassc dependency.
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1555>
Diffstat (limited to 'meson')
-rw-r--r-- | meson/generate-stylesheets.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/meson/generate-stylesheets.py b/meson/generate-stylesheets.py new file mode 100644 index 000000000..35242c68f --- /dev/null +++ b/meson/generate-stylesheets.py @@ -0,0 +1,19 @@ +#!/usr/bin/env python3 + +import os +from pathlib import PurePath +import subprocess + +stylesheets = [ + 'data/theme/gnome-shell-high-contrast.css', + 'data/theme/gnome-shell.css' +] + +sourceroot = os.environ.get('MESON_SOURCE_ROOT') +distroot = os.environ.get('MESON_DIST_ROOT') + +for stylesheet in stylesheets: + stylesheet_path = PurePath(stylesheet) + src = PurePath(sourceroot, stylesheet_path.with_suffix('.scss')) + dst = PurePath(distroot, stylesheet_path) + subprocess.call(['sassc', '-a', src, dst]) |