File: launch.py

package info (click to toggle)
gajim 2.4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 17,320 kB
  • sloc: python: 79,114; sh: 387; xml: 67; makefile: 6
file content (21 lines) | stat: -rwxr-xr-x 506 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env python3

import subprocess
from pathlib import Path

if __name__ == "__main__":
    # Protect the entry point of the application because we use
    # the multiprocessing module with "spawn"

    import gajim
    import gajim.main

    try:
        res = subprocess.check_output(
            ["git", "-C", f"{Path(__file__).parent}", "rev-parse", "--short=12", "HEAD"]
        )
        gajim.__version__ += f"+{res.decode().strip()}"
    except Exception:
        pass

    gajim.main.run()