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.
 
 
 

66 lines
2.1 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. # External modules that need to be built
  16. ext_modules = [ Extension('nilmdb.server.rocket', ['nilmdb/server/rocket.c' ]) ]
  17. # Use Cython.
  18. cython_modules = [ 'nilmdb.server.interval', 'nilmdb.server.rbtree' ]
  19. import Cython
  20. from Cython.Build import cythonize
  21. for modulename in cython_modules:
  22. filename = modulename.replace('.','/')
  23. ext_modules.extend(cythonize(filename + ".pyx"))
  24. # Get list of requirements to use in `install_requires` below. Note
  25. # that we don't make a distinction between things that are actually
  26. # required for end-users vs developers (or use `test_requires` or
  27. # anything else) -- just install everything for simplicity.
  28. install_requires = open('requirements.txt').readlines()
  29. # Run setup
  30. setup(name='nilmdb',
  31. version = versioneer.get_version(),
  32. cmdclass = versioneer.get_cmdclass(),
  33. url = 'https://git.jim.sh/jim/lees/nilmdb.git',
  34. author = 'Jim Paris',
  35. description = "NILM Database",
  36. long_description = "NILM Database",
  37. license = "Proprietary",
  38. author_email = 'jim@jtan.com',
  39. setup_requires = [ 'setuptools' ],
  40. install_requires = install_requires,
  41. packages = [ 'nilmdb',
  42. 'nilmdb.utils',
  43. 'nilmdb.server',
  44. 'nilmdb.client',
  45. 'nilmdb.cmdline',
  46. 'nilmdb.scripts',
  47. 'nilmdb.fsck',
  48. ],
  49. entry_points = {
  50. 'console_scripts': [
  51. 'nilmtool = nilmdb.scripts.nilmtool:main',
  52. 'nilmdb-server = nilmdb.scripts.nilmdb_server:main',
  53. 'nilmdb-fsck = nilmdb.scripts.nilmdb_fsck:main',
  54. ],
  55. },
  56. ext_modules = ext_modules,
  57. zip_safe = False,
  58. )