You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

71 lines
2.3 KiB

  1. #!/usr/bin/python
  2. # To release a new version, tag it:
  3. # git tag -a nilmdb-1.1 -m "Version 1.1"
  4. # git push --tags
  5. # Then just package it up:
  6. # python setup.py sdist
  7. import traceback
  8. import sys
  9. import os
  10. from setuptools import setup
  11. from distutils.extension import Extension
  12. # Versioneer manages version numbers from git tags.
  13. # https://github.com/warner/python-versioneer
  14. import versioneer
  15. # Hack to workaround logging/multiprocessing issue:
  16. # https://groups.google.com/d/msg/nose-users/fnJ-kAUbYHQ/_UsLN786ygcJ
  17. try: import multiprocessing
  18. except Exception: pass
  19. # External modules that need to be built
  20. ext_modules = [ Extension('nilmdb.server.rocket', ['nilmdb/server/rocket.c' ]) ]
  21. # Use Cython.
  22. cython_modules = [ 'nilmdb.server.interval', 'nilmdb.server.rbtree' ]
  23. import Cython
  24. from Cython.Build import cythonize
  25. for modulename in cython_modules:
  26. filename = modulename.replace('.','/')
  27. ext_modules.extend(cythonize(filename + ".pyx"))
  28. # Get list of requirements to use in `install_requires` below. Note
  29. # that we don't make a distinction between things that are actually
  30. # required for end-users vs developers (or use `test_requires` or
  31. # anything else) -- just install everything for simplicity.
  32. install_requires = open('requirements.txt').readlines()
  33. # Run setup
  34. setup(name='nilmdb',
  35. version = versioneer.get_version(),
  36. cmdclass = versioneer.get_cmdclass(),
  37. url = 'https://git.jim.sh/jim/lees/nilmdb.git',
  38. author = 'Jim Paris',
  39. description = "NILM Database",
  40. long_description = "NILM Database",
  41. license = "Proprietary",
  42. author_email = 'jim@jtan.com',
  43. setup_requires = [ 'setuptools' ],
  44. install_requires = install_requires,
  45. packages = [ 'nilmdb',
  46. 'nilmdb.utils',
  47. 'nilmdb.server',
  48. 'nilmdb.client',
  49. 'nilmdb.cmdline',
  50. 'nilmdb.scripts',
  51. 'nilmdb.fsck',
  52. ],
  53. entry_points = {
  54. 'console_scripts': [
  55. 'nilmtool = nilmdb.scripts.nilmtool:main',
  56. 'nilmdb-server = nilmdb.scripts.nilmdb_server:main',
  57. 'nilmdb-fsck = nilmdb.scripts.nilmdb_fsck:main',
  58. ],
  59. },
  60. ext_modules = ext_modules,
  61. zip_safe = False,
  62. )