mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-04-29 02:12:36 +02:00
Fix finding version in PyInstaller spec
This commit is contained in:
parent
0c6c05a29e
commit
26adc1b3ab
1 changed files with 2 additions and 4 deletions
|
@ -1,5 +1,4 @@
|
||||||
# -*- mode: python -*-
|
# -*- mode: python -*-
|
||||||
import sys
|
|
||||||
import os
|
import os
|
||||||
import inspect
|
import inspect
|
||||||
import platform
|
import platform
|
||||||
|
@ -12,10 +11,9 @@ root = os.path.dirname(
|
||||||
os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
|
os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
sys.path.insert(0, root)
|
with open(os.path.join(root, "share", "version.txt")) as f:
|
||||||
import dangerzone
|
version = f.read().strip()
|
||||||
|
|
||||||
version = dangerzone.dangerzone_version
|
|
||||||
print("Dangerzone version: {}".format(version))
|
print("Dangerzone version: {}".format(version))
|
||||||
|
|
||||||
if p == "Darwin":
|
if p == "Darwin":
|
||||||
|
|
Loading…
Reference in a new issue