File: meson_dist.py

package info (click to toggle)
font-manager 0.9.4-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 17,684 kB
  • sloc: ansic: 13,202; perl: 684; xml: 494; python: 321; makefile: 123
file content (40 lines) | stat: -rw-r--r-- 688 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/usr/bin/env python3

from glob import glob
from os import chdir, environ, remove
from shutil import rmtree

chdir(environ['MESON_DIST_ROOT'])

# Directories which shouldn't be included in a release
excluded_dirs = {
    'build-aux',
    'debian',
    'fedora',
    '.github'
}

excluded_files = {
    '.gitattributes',
    '.gitignore'
}

for d in excluded_dirs:
    try:
        rmtree(d)
    except FileNotFoundError:
        pass

for f in excluded_files:
    try:
        remove(f)
    except FileNotFoundError:
        pass

# Remove README translations to minimize archive size
for f in glob("README.*.md"):
    try:
        remove(f)
    except FileNotFoundError:
        pass