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.
 
 
 

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