Skip to content

Commit 9bbc3c9

Browse files
author
Eric Cheng
committed
relocate splunklib under lib folder
1 parent 746fffc commit 9bbc3c9

File tree

10 files changed

+26
-21
lines changed

10 files changed

+26
-21
lines changed

examples/searchcommands_app/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ The app is tested on Splunk 5 and 6. Here is its manifest:
1515

1616
```
1717
├── bin
18-
│ ├── splunklib
19-
│ │ └── searchcommands ....... splunklib.searchcommands module
2018
│   ├── countmatches.py .......... CountMatchesCommand implementation
2119
│ ├── generatetext.py .......... GenerateTextCommand implementation
2220
│ ├── pypygeneratetext.py ...... Executes generatetext.py with PyPy
2321
│ ├── simulate.py .............. SimulateCommand implementation
24-
│ ├── sum.py ................... SumCommand implementation
25-
│   └──
22+
│ └── sum.py ................... SumCommand implementation
23+
├── lib
24+
│ └── splunklib
25+
│ └── searchcommands ....... splunklib.searchcommands module
2626
├── default
2727
│ ├── data
2828
│ │   └── ui

examples/searchcommands_app/package/bin/countmatches.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@
1919
import app
2020
import sys
2121

22+
from splunk.clilib.bundle_paths import make_splunkhome_path
2223
sys.path.append(make_splunkhome_path(['etc', 'apps', 'searchcommands_app', 'lib']))
23-
from packages.splunklib.searchcommands import dispatch, StreamingCommand, Configuration, Option, validators
24-
from packages.splunklib import six
24+
from splunklib.searchcommands import dispatch, StreamingCommand, Configuration, Option, validators
25+
from splunklib import six
2526

2627

2728
@Configuration()

examples/searchcommands_app/package/bin/filter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717

1818
from __future__ import absolute_import, division, print_function, unicode_literals
1919
import app
20-
2120
import sys
2221

22+
from splunk.clilib.bundle_paths import make_splunkhome_path
2323
sys.path.append(make_splunkhome_path(['etc', 'apps', 'searchcommands_app', 'lib']))
24-
from packages.splunklib.searchcommands import dispatch, EventingCommand, Configuration, Option
25-
from packages.splunklib.searchcommands.validators import Code
24+
from splunklib.searchcommands import dispatch, EventingCommand, Configuration, Option
25+
from splunklib.searchcommands.validators import Code
2626

2727

2828

examples/searchcommands_app/package/bin/generatehello.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@
2020
import sys
2121
import time
2222

23+
from splunk.clilib.bundle_paths import make_splunkhome_path
2324
sys.path.append(make_splunkhome_path(['etc', 'apps', 'searchcommands_app', 'lib']))
24-
from packages.splunklib.searchcommands import dispatch, GeneratingCommand, Configuration, Option, validators
25-
from six.moves import range
25+
from splunklib.searchcommands import dispatch, GeneratingCommand, Configuration, Option, validators
26+
from splunklib.six.moves import range
2627

2728

2829
@Configuration()

examples/searchcommands_app/package/bin/generatetext.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@
2020
import sys
2121
import time
2222

23+
from splunk.clilib.bundle_paths import make_splunkhome_path
2324
sys.path.append(make_splunkhome_path(['etc', 'apps', 'searchcommands_app', 'lib']))
24-
from packages.splunklib.searchcommands import dispatch, GeneratingCommand, Configuration, Option, validators
25-
from packages.splunklib import six
26-
from packages.splunklib.six.moves import range
25+
from splunklib.searchcommands import dispatch, GeneratingCommand, Configuration, Option, validators
26+
from splunklib import six
27+
from splunklib.six.moves import range
2728

2829

2930
@Configuration()

examples/searchcommands_app/package/bin/pypygeneratetext.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@
6565
import app
6666
import sys
6767

68+
from splunk.clilib.bundle_paths import make_splunkhome_path
6869
sys.path.append(make_splunkhome_path(['etc', 'apps', 'searchcommands_app', 'lib']))
69-
from packages.splunklib.searchcommands import app_root, execute
70+
from splunklib.searchcommands import app_root, execute
7071
from os import environ, path
7172

7273

examples/searchcommands_app/package/bin/simulate.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@
2323
import sys
2424
import time
2525

26+
from splunk.clilib.bundle_paths import make_splunkhome_path
2627
sys.path.append(make_splunkhome_path(['etc', 'apps', 'searchcommands_app', 'lib']))
27-
from packages.splunklib.searchcommands import dispatch, GeneratingCommand, Configuration, Option, validators
28+
from splunklib.searchcommands import dispatch, GeneratingCommand, Configuration, Option, validators
2829

2930

3031
@Configuration()

examples/searchcommands_app/package/bin/sum.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@
1919
import app
2020
import sys
2121

22+
from splunk.clilib.bundle_paths import make_splunkhome_path
2223
sys.path.append(make_splunkhome_path(['etc', 'apps', 'searchcommands_app', 'lib']))
23-
from packages.splunklib.searchcommands import dispatch, ReportingCommand, Configuration, Option, validators
24+
from splunklib.searchcommands import dispatch, ReportingCommand, Configuration, Option, validators
2425

2526

2627
@Configuration(requires_preop=True)

examples/searchcommands_app/setup.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -454,13 +454,12 @@ def run(self):
454454
'Topic :: System :: Logging',
455455
'Topic :: System :: Monitoring'],
456456
packages=[
457-
'lib.packages.splunklib', 'lib.packages.splunklib.searchcommands'
457+
'lib.splunklib', 'lib.splunklib.searchcommands'
458458
],
459459
package_dir={
460460
'lib': os.path.join('package', 'lib'),
461-
'lib.packages': os.path.join('package', 'lib', 'packages'),
462-
'lib.packages.splunklib': os.path.join('..', '..', 'splunklib'),
463-
'lib.packages.splunklib.searchcommands': os.path.join('..', '..', 'splunklib', 'searchcommands')
461+
'lib.splunklib': os.path.join('..', '..', 'splunklib'),
462+
'lib.splunklib.searchcommands': os.path.join('..', '..', 'splunklib', 'searchcommands')
464463
},
465464
package_data={
466465
'bin': [

0 commit comments

Comments
 (0)