Browse Source

Move nilmtool into a dedicated nilmdb.scripts module

tags/nilmdb-1.0
Jim Paris 9 years ago
parent
commit
3fe3e2ca95
6 changed files with 15 additions and 7 deletions
  1. +1
    -1
      .coveragerc
  2. +1
    -1
      nilmdb/cmdline/__init__.py
  3. +0
    -4
      nilmdb/cmdline/cmdline.py
  4. +1
    -0
      nilmdb/scripts/__init__.py
  5. +10
    -0
      nilmdb/scripts/nilmtool.py
  6. +2
    -1
      setup.py

+ 1
- 1
.coveragerc View File

@@ -7,4 +7,4 @@
exclude_lines =
pragma: no cover
if 0:
omit = nilmdb/utils/datetime_tz*
omit = nilmdb/utils/datetime_tz*,nilmdb/scripts

+ 1
- 1
nilmdb/cmdline/__init__.py View File

@@ -1,3 +1,3 @@
"""nilmdb.cmdline"""

from nilmdb.cmdline.cmdline import Cmdline, main
from nilmdb.cmdline.cmdline import Cmdline

+ 0
- 4
nilmdb/cmdline/cmdline.py View File

@@ -154,7 +154,3 @@ class Cmdline(object):

self.client.close()
sys.exit(retval)

# Entry point for the "nilmtool" script
def main(): # pragma: no cover
nilmdb.cmdline.Cmdline().run()

+ 1
- 0
nilmdb/scripts/__init__.py View File

@@ -0,0 +1 @@
# Command line scripts

+ 10
- 0
nilmdb/scripts/nilmtool.py View File

@@ -0,0 +1,10 @@
#!/usr/bin/python

import nilmdb.cmdline

def main():
"""Main entry point for the 'nilmtool' command line script"""
nilmdb.cmdline.Cmdline().run()

if __name__ == "__main__":
main()

+ 2
- 1
setup.py View File

@@ -43,10 +43,11 @@ setup(name='nilmdb',
'nilmdb.server',
'nilmdb.client',
'nilmdb.cmdline',
'nilmdb.scripts',
],
entry_points = {
'console_scripts': [
'nilmtool = nilmdb.cmdline:main',
'nilmtool = nilmdb.scripts.nilmtool:main',
],
},
ext_modules = cython_modules,


Loading…
Cancel
Save