Fix finding version in PyInstaller spec

This commit is contained in:
Micah Lee 2021-06-16 14:06:26 -07:00
parent 0c6c05a29e
commit 26adc1b3ab
No known key found for this signature in database
GPG key ID: 403C2657CD994F73

View file

@ -1,5 +1,4 @@
# -*- mode: python -*-
import sys
import os
import inspect
import platform
@ -12,10 +11,9 @@ root = os.path.dirname(
os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
)
)
sys.path.insert(0, root)
import dangerzone
with open(os.path.join(root, "share", "version.txt")) as f:
version = f.read().strip()
version = dangerzone.dangerzone_version
print("Dangerzone version: {}".format(version))
if p == "Darwin":