Skip to content

Commit 9650cd6

Browse files
author
David Noble
committed
"setup.py link" command now links splunklib to bin/packages/splunklib
1 parent 9ec5972 commit 9650cd6

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

‎examples/searchcommands_app/setup.py‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,19 @@ def run(self):
314314
message = 'Cannot create a link at "{}" because a file by that name already exists.'.format(target)
315315
raise SystemError(message)
316316

317+
packages = os.path.join(self.app_source, 'bin', 'packages')
318+
319+
if not os.path.isdir(packages):
320+
os.mkdir(packages)
321+
322+
splunklib = os.path.join(packages, 'splunklib')
323+
source = os.path.join(project_dir, '..', '..', 'splunklib')
324+
325+
if os.path.islink(splunklib):
326+
os.remove(splunklib)
327+
328+
os.symlink(source, splunklib)
329+
317330
self._link_debug_client()
318331
install_packages(self.app_source, self.distribution)
319332

0 commit comments

Comments
 (0)