Skip to content

Commit f37d08d

Browse files
committed
build(config): installation of task configs will be moved to ansible
sister PR: chime-experiment/ch_ansible#91 we previously used --install-options when installing dias bc of this pip bug pypa/pip#1883, we could not use that option - it applied it to all of dias' dependencies
1 parent 03b5476 commit f37d08d

File tree

1 file changed

+0
-41
lines changed

1 file changed

+0
-41
lines changed

setup.py

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -13,47 +13,6 @@
1313
import sys
1414
import versioneer
1515

16-
# The path to install the task configuration files into, if any
17-
task_dst = None
18-
19-
# Strip out a --task-conf option if given to the install command
20-
found_install = False
21-
for arg in sys.argv:
22-
if arg == "install":
23-
found_install = True
24-
elif found_install and arg.startswith("--task-conf="):
25-
task_dst = os.path.join(arg[arg.find("=") + 1 :], "tasks")
26-
sys.argv.remove(arg)
27-
break
28-
29-
# Installing task configuration, if requested
30-
if task_dst:
31-
# Check for the source directory
32-
task_src = os.path.join(os.path.dirname(sys.argv[0]), "conf", "tasks")
33-
if not os.path.isdir(task_src):
34-
raise FileExistsError(
35-
"Task configruation directory {0} not found".format(task_src)
36-
)
37-
38-
# We don't allow installing the task config directory over
39-
# top of an existing directory, because that would likely
40-
# result in a mix of old and new configuration
41-
try:
42-
os.mkdir(task_dst, 0o755)
43-
except FileExistsError:
44-
# Re-raise with an explanation
45-
raise FileExistsError(
46-
"Cannot install task configraution: " "{0} already exists.".format(task_dst)
47-
)
48-
49-
# Now copy all the task configuration files
50-
print("Installing task configuration files to {0}".format(task_dst))
51-
for name in os.listdir(task_src):
52-
path = os.path.join(task_src, name)
53-
if name.endswith(".conf") and os.path.isfile(path):
54-
shutil.copy(path, task_dst)
55-
56-
# Now for the regular setuptools-y stuff
5716
setuptools.setup(
5817
name="dias",
5918
version=versioneer.get_version(),

0 commit comments

Comments
 (0)