|
- #!/usr/bin/python
-
- # To release a new version, tag it:
- # git tag -a nilmrun-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 = 'nilmrun/_version.py'
- versioneer.versionfile_build = 'nilmrun/_version.py'
- versioneer.tag_prefix = 'nilmrun-'
- versioneer.parentdir_prefix = 'nilmrun-'
-
- # 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='nilmrun',
- version = versioneer.get_version(),
- cmdclass = versioneer.get_cmdclass(),
- url = 'https://git.jim.sh/jim/lees/nilmrun.git',
- author = 'Jim Paris',
- description = "NILM Database Filter Runner",
- long_description = "NILM Database Filter Runner",
- license = "Proprietary",
- author_email = 'jim@jtan.com',
- install_requires = [ 'nilmdb >= 1.8.0',
- 'nilmtools >= 1.2.2',
- 'numpy',
- 'scipy',
- ],
- packages = [ 'nilmrun',
- 'nilmrun.scripts',
- ],
- package_dir = { 'nilmrun': 'nilmrun',
- 'nilmrun.scripts': 'scripts',
- },
- entry_points = {
- 'console_scripts': [
- 'nilmrun-server = nilmrun.scripts.nilmrun_server:main',
- 'nilm-trainola = nilmrun.trainola:main',
- ],
- },
- zip_safe = False,
- )
|