Hopefully final fix to setup.
This commit is contained in:
parent
9f57f7faec
commit
80f549fde9
10
setup.py
10
setup.py
@ -1,5 +1,4 @@
|
||||
#!/usr/bin/env python3
|
||||
#https://python-packaging.readthedocs.io/en/latest/minimal.html
|
||||
import os, glob, sys
|
||||
import os.path
|
||||
from shutil import copyfile
|
||||
@ -7,9 +6,12 @@ from setuptools import find_namespace_packages
|
||||
from setuptools import setup
|
||||
|
||||
# handle flags for package manager like aurman and pacaur.
|
||||
forceSettingsFlag = False
|
||||
# Allow both environment variable and command line flag
|
||||
forceSettingsFlag = (
|
||||
"--force-settings" in sys.argv or
|
||||
os.environ.get('FENRIR_FORCE_SETTINGS') == '1'
|
||||
)
|
||||
if "--force-settings" in sys.argv:
|
||||
forceSettingsFlag = True
|
||||
sys.argv.remove("--force-settings")
|
||||
|
||||
dataFiles = []
|
||||
@ -34,7 +36,7 @@ for directory in directories:
|
||||
destDir = '/etc/fenrirscreenreader/settings'
|
||||
if not forceSettingsFlag:
|
||||
try:
|
||||
del(files[files.index('config/settings/settings.conf')])
|
||||
files = [f for f in files if not f.endswith('settings.conf')]
|
||||
except:
|
||||
pass
|
||||
elif 'config/scripts' in directory:
|
||||
|
Loading…
Reference in New Issue
Block a user