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.
 
 
 
 

76 lines
2.2 KiB

  1. #!/usr/bin/python
  2. # To release a new version, tag it:
  3. # git tag -a nilmtools-1.1 -m "Version 1.1"
  4. # git push --tags
  5. # Then just package it up:
  6. # python setup.py sdist
  7. # This is supposed to be using Distribute:
  8. #
  9. # distutils provides a "setup" method.
  10. # setuptools is a set of monkeypatches on top of that.
  11. # distribute is a particular version/implementation of setuptools.
  12. #
  13. # So we don't really know if this is using the old setuptools or the
  14. # Distribute-provided version of setuptools.
  15. import traceback
  16. import sys
  17. import os
  18. try:
  19. from setuptools import setup, find_packages
  20. import distutils.version
  21. except ImportError:
  22. traceback.print_exc()
  23. print "Please install the prerequisites listed in README.txt"
  24. sys.exit(1)
  25. # Versioneer manages version numbers from git tags.
  26. # https://github.com/warner/python-versioneer
  27. import versioneer
  28. versioneer.versionfile_source = 'nilmtools/_version.py'
  29. versioneer.versionfile_build = 'nilmtools/_version.py'
  30. versioneer.tag_prefix = 'nilmtools-'
  31. versioneer.parentdir_prefix = 'nilmtools-'
  32. # Hack to workaround logging/multiprocessing issue:
  33. # https://groups.google.com/d/msg/nose-users/fnJ-kAUbYHQ/_UsLN786ygcJ
  34. try: import multiprocessing
  35. except: pass
  36. # We need a MANIFEST.in. Generate it here rather than polluting the
  37. # repository with yet another setup-related file.
  38. with open("MANIFEST.in", "w") as m:
  39. m.write("""
  40. # Root
  41. include README.txt
  42. include setup.py
  43. include versioneer.py
  44. include Makefile
  45. """)
  46. # Run setup
  47. setup(name='nilmtools',
  48. version = versioneer.get_version(),
  49. cmdclass = versioneer.get_cmdclass(),
  50. url = 'https://git.jim.sh/jim/lees/nilmtools.git',
  51. author = 'Jim Paris',
  52. description = "NILM Database Tools",
  53. long_description = "NILM Database Tools",
  54. license = "Proprietary",
  55. author_email = 'jim@jtan.com',
  56. install_requires = [ 'nilmdb >= 1.3.0',
  57. ],
  58. packages = [ 'nilmtools',
  59. ],
  60. entry_points = {
  61. 'console_scripts': [
  62. 'nilm-decimate = nilmtools.decimate:main',
  63. 'nilm-insert = nilmtools.insert:main',
  64. ],
  65. },
  66. zip_safe = False,
  67. )