Fix workaround for PyInstaller...
This commit is contained in:
parent
295b53a2d3
commit
603fd62a1e
1 changed files with 11 additions and 8 deletions
|
@ -13,15 +13,18 @@ your intentions, and received permission to distribute.
|
||||||
The primary interface is the 'dosage' commandline script.
|
The primary interface is the 'dosage' commandline script.
|
||||||
Comic modules for each comic are located in L{dosagelib.plugins}.
|
Comic modules for each comic are located in L{dosagelib.plugins}.
|
||||||
"""
|
"""
|
||||||
|
from __future__ import absolute_import, division, print_function
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import os
|
||||||
from pbr.version import VersionInfo
|
from pbr.version import VersionInfo
|
||||||
import pkg_resources
|
|
||||||
|
|
||||||
AppName = u'dosage'
|
AppName = u'dosage'
|
||||||
try:
|
|
||||||
version_info = VersionInfo(AppName)
|
# Workaround for pkg_resources not working inside PyInstaller...
|
||||||
__version__ = version_info.version_string() # PEP 396
|
if hasattr(sys, 'frozen'):
|
||||||
AppVersion = version_info.version_string_with_vcs()
|
os.environ['PBR_VERSION'] = '2.15.0'
|
||||||
except pkg_resources.DistributionNotFound:
|
|
||||||
__version__ = "2.15.0"
|
version_info = VersionInfo(AppName)
|
||||||
AppVersion = __version__ + "-unknown"
|
__version__ = version_info.version_string() # PEP 396
|
||||||
|
AppVersion = version_info.release_string()
|
||||||
|
|
Loading…
Reference in a new issue