mirror of
https://github.com/EDCD/EDDN.git
synced 2025-04-12 07:00:04 +03:00
setup: Use setup_env.py for per-environment settings
This commit is contained in:
parent
2a4f8488cd
commit
1804799507
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,6 +1,6 @@
|
|||||||
# Hoping this can be a per environment config, so needs to not be merged
|
# These need to be per-environment, so not changed by git merges.
|
||||||
# by git, so not *in* git.
|
|
||||||
setup.cfg
|
setup.cfg
|
||||||
|
setup_env.py
|
||||||
|
|
||||||
# Byte-compiled / optimized / DLL files
|
# Byte-compiled / optimized / DLL files
|
||||||
__pycache__/
|
__pycache__/
|
||||||
|
12
setup.py
12
setup.py
@ -17,11 +17,13 @@ except EnvironmentError:
|
|||||||
print "unable to find version in %s" % (VERSIONFILE,)
|
print "unable to find version in %s" % (VERSIONFILE,)
|
||||||
raise RuntimeError("if %s exists, it is required to be well-formed" % (VERSIONFILE,))
|
raise RuntimeError("if %s exists, it is required to be well-formed" % (VERSIONFILE,))
|
||||||
|
|
||||||
EDDN_ENV="dev"
|
# Read environment-specific settings
|
||||||
|
import setup_env
|
||||||
|
|
||||||
# Location of start-eddn-service script and its config file
|
# Location of start-eddn-service script and its config file
|
||||||
START_SCRIPT_BIN='%s/.local/bin' % ( os.environ['HOME'] )
|
START_SCRIPT_BIN='%s/.local/bin' % ( os.environ['HOME'] )
|
||||||
# Location of web files
|
# Location of web files
|
||||||
SHARE_EDDN_FILES='%s/.local/share/eddn/%s' % ( os.environ['HOME'], EDDN_ENV )
|
SHARE_EDDN_FILES='%s/.local/share/eddn/%s' % ( os.environ['HOME'], setup_env.EDDN_ENV )
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='eddn',
|
name='eddn',
|
||||||
@ -96,12 +98,12 @@ if not os.path.isdir(START_SCRIPT_BIN):
|
|||||||
os.chdir(old_cwd)
|
os.chdir(old_cwd)
|
||||||
|
|
||||||
shutil.copy(
|
shutil.copy(
|
||||||
'contrib/systemd/eddn_%s_config' % ( EDDN_ENV),
|
'contrib/systemd/eddn_%s_config' % ( setup_env.EDDN_ENV),
|
||||||
'%s/eddn_%s_config' % ( START_SCRIPT_BIN, EDDN_ENV )
|
'%s/eddn_%s_config' % ( START_SCRIPT_BIN, setup_env.EDDN_ENV )
|
||||||
)
|
)
|
||||||
shutil.copy(
|
shutil.copy(
|
||||||
'contrib/systemd/start-eddn-service',
|
'contrib/systemd/start-eddn-service',
|
||||||
'%s/start-eddn-%s-service' % ( START_SCRIPT_BIN, EDDN_ENV )
|
'%s/start-eddn-%s-service' % ( START_SCRIPT_BIN, setup_env.EDDN_ENV )
|
||||||
)
|
)
|
||||||
|
|
||||||
# Ensure the latest monitor files are in place
|
# Ensure the latest monitor files are in place
|
||||||
|
Loading…
x
Reference in New Issue
Block a user