Print version upon start
This commit is contained in:
@@ -1,13 +1,6 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
from pkg_resources import get_distribution, DistributionNotFound
|
|
||||||
try:
|
|
||||||
__version__ = get_distribution(__name__).version
|
|
||||||
except DistributionNotFound:
|
|
||||||
# package is not installed
|
|
||||||
pass
|
|
||||||
|
|
||||||
import sys
|
import sys
|
||||||
from .main import main
|
from .main import main
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,12 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
from pkg_resources import get_distribution, DistributionNotFound
|
||||||
|
try:
|
||||||
|
__version__ = get_distribution('photobooth').version
|
||||||
|
except DistributionNotFound:
|
||||||
|
__version__ = 'unknown'
|
||||||
|
|
||||||
from multiprocessing import Pipe, Process
|
from multiprocessing import Pipe, Process
|
||||||
import importlib
|
import importlib
|
||||||
|
|
||||||
@@ -8,6 +14,7 @@ import camera, gui
|
|||||||
from Config import Config
|
from Config import Config
|
||||||
from Photobooth import Photobooth
|
from Photobooth import Photobooth
|
||||||
|
|
||||||
|
|
||||||
def lookup_and_import(module_list, name, package=None):
|
def lookup_and_import(module_list, name, package=None):
|
||||||
|
|
||||||
result = next(((mod_name, class_name)
|
result = next(((mod_name, class_name)
|
||||||
@@ -53,6 +60,7 @@ def main_photobooth(config, send, recv):
|
|||||||
|
|
||||||
|
|
||||||
def run(argv):
|
def run(argv):
|
||||||
|
print('Photobooth version:', __version__)
|
||||||
|
|
||||||
config = Config('photobooth.cfg')
|
config = Config('photobooth.cfg')
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user