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
|
#!/usr/bin/env python3
|
||||||
#https://python-packaging.readthedocs.io/en/latest/minimal.html
|
|
||||||
import os, glob, sys
|
import os, glob, sys
|
||||||
import os.path
|
import os.path
|
||||||
from shutil import copyfile
|
from shutil import copyfile
|
||||||
@ -7,9 +6,12 @@ from setuptools import find_namespace_packages
|
|||||||
from setuptools import setup
|
from setuptools import setup
|
||||||
|
|
||||||
# handle flags for package manager like aurman and pacaur.
|
# 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:
|
if "--force-settings" in sys.argv:
|
||||||
forceSettingsFlag = True
|
|
||||||
sys.argv.remove("--force-settings")
|
sys.argv.remove("--force-settings")
|
||||||
|
|
||||||
dataFiles = []
|
dataFiles = []
|
||||||
@ -34,7 +36,7 @@ for directory in directories:
|
|||||||
destDir = '/etc/fenrirscreenreader/settings'
|
destDir = '/etc/fenrirscreenreader/settings'
|
||||||
if not forceSettingsFlag:
|
if not forceSettingsFlag:
|
||||||
try:
|
try:
|
||||||
del(files[files.index('config/settings/settings.conf')])
|
files = [f for f in files if not f.endswith('settings.conf')]
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
elif 'config/scripts' in directory:
|
elif 'config/scripts' in directory:
|
||||||
|
Loading…
Reference in New Issue
Block a user