|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- #!/usr/bin/python
-
- # To release a new version, tag it:
- # git tag -a nilmtools-1.1 -m "Version 1.1"
- # git push --tags
- # Then just package it up:
- # python setup.py sdist
-
- # This is supposed to be using Distribute:
- #
- # distutils provides a "setup" method.
- # setuptools is a set of monkeypatches on top of that.
- # distribute is a particular version/implementation of setuptools.
- #
- # So we don't really know if this is using the old setuptools or the
- # Distribute-provided version of setuptools.
-
- import traceback
- import sys
- import os
-
- try:
- from setuptools import setup, find_packages
- import distutils.version
- except ImportError:
- traceback.print_exc()
- print "Please install the prerequisites listed in README.txt"
- sys.exit(1)
-
- # Versioneer manages version numbers from git tags.
- # https://github.com/warner/python-versioneer
- import versioneer
- versioneer.versionfile_source = 'nilmtools/_version.py'
- versioneer.versionfile_build = 'nilmtools/_version.py'
- versioneer.tag_prefix = 'nilmtools-'
- versioneer.parentdir_prefix = 'nilmtools-'
-
- # Hack to workaround logging/multiprocessing issue:
- # https://groups.google.com/d/msg/nose-users/fnJ-kAUbYHQ/_UsLN786ygcJ
- try: import multiprocessing
- except: pass
-
- # We need a MANIFEST.in. Generate it here rather than polluting the
- # repository with yet another setup-related file.
- with open("MANIFEST.in", "w") as m:
- m.write("""
- # Root
- include README.txt
- include setup.py
- include versioneer.py
- include Makefile
- """)
-
- # Run setup
- setup(name='nilmtools',
- version = versioneer.get_version(),
- cmdclass = versioneer.get_cmdclass(),
- url = 'https://git.jim.sh/jim/lees/nilmtools.git',
- author = 'Jim Paris',
- description = "NILM Database Tools",
- long_description = "NILM Database Tools",
- license = "Proprietary",
- author_email = 'jim@jtan.com',
- install_requires = [ 'nilmdb >= 1.3.0',
- ],
- packages = [ 'nilmtools',
- ],
- entry_points = {
- 'console_scripts': [
- 'nilm-decimate = nilmtools.decimate:main',
- 'nilm-insert = nilmtools.insert:main',
- 'nilm-copy = nilmtools.copy:main',
- ],
- },
- zip_safe = False,
- )
|