File: meson_postinstall.py

package info (click to toggle)
python-rtmidi 1.5.8-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,248 kB
  • sloc: cpp: 4,228; python: 2,853; makefile: 287; sh: 109; ansic: 19
file content (15 lines) | stat: -rwxr-xr-x 462 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/usr/bin/env python3

import sysconfig
from compileall import compile_dir
from os import environ, path

destdir = environ.get('MESON_INSTALL_DESTDIR_PREFIX', '')
verbose = environ.get("MESON_INSTALL_QUIET") is None

if verbose:
    print('Compiling Python module to bytecode...')

moduledir = sysconfig.get_path('purelib', vars={'base': destdir})
compile_dir(path.join(moduledir, 'rtmidi'), optimize=1, quiet=not verbose,
            stripdir=destdir or None)