Fixed a bug in setup.py.
This commit is contained in:
parent
d6a9332f80
commit
90d8e62db0
12
setup.py
12
setup.py
@ -5,8 +5,9 @@ import glob
|
||||
from shutil import copyfile
|
||||
from setuptools import setup
|
||||
|
||||
def get_data_files(force_settings=False):
|
||||
def get_data_files():
|
||||
data_files = []
|
||||
force_settings = os.environ.get('FENRIR_FORCE_SETTINGS') == '1'
|
||||
|
||||
# Handle locale files
|
||||
locale_files = glob.glob('locale/*/LC_MESSAGES/*.mo')
|
||||
@ -45,7 +46,8 @@ def get_data_files(force_settings=False):
|
||||
return data_files
|
||||
|
||||
def post_install_actions():
|
||||
if '--force-settings' not in sys.argv:
|
||||
force_settings = os.environ.get('FENRIR_FORCE_SETTINGS') == '1'
|
||||
if not force_settings:
|
||||
print('')
|
||||
# create settings file from example if not exist
|
||||
if not os.path.isfile('/etc/fenrirscreenreader/settings/settings.conf'):
|
||||
@ -70,12 +72,8 @@ def post_install_actions():
|
||||
print('- sox: is a player for the generic sound driver')
|
||||
|
||||
if __name__ == "__main__":
|
||||
force_settings = '--force-settings' in sys.argv
|
||||
if force_settings:
|
||||
sys.argv.remove('--force-settings')
|
||||
|
||||
setup(
|
||||
data_files=get_data_files(force_settings),
|
||||
data_files=get_data_files(),
|
||||
)
|
||||
|
||||
post_install_actions()
|
||||
|
Loading…
Reference in New Issue
Block a user