Skip to content

Commit

Permalink
Adding setup for travis ci
Browse files Browse the repository at this point in the history
  • Loading branch information
Digant C Kasundra committed May 8, 2015
1 parent b1bcaab commit 050256a
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bin/hermes-server.py → bin/hermes-server
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
def main(argv):

parser = argparse.ArgumentParser(description="Event Management Service ")
parser.add_argument("-c", "--config", default="/etc/nsot.yaml",
parser.add_argument("-c", "--config", default="/etc/hermes.yaml",
help="Path to config file.")
parser.add_argument("-v", "--verbose", action="count", default=0, help="Increase logging verbosity.")
parser.add_argument("-q", "--quiet", action="count", default=0, help="Decrease logging verbosity.")
Expand Down
4 changes: 2 additions & 2 deletions hermes/exc.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
from tornado.web import HTTPError

class Error(Exception):
""" Baseclass for NSoT Exceptions."""
""" Baseclass for Hermes Exceptions."""

class ModelError(Error):
""" Baseclass for NSoT Model Exceptions."""
""" Baseclass for Hermes Model Exceptions."""

class ValidationError(ModelError):
""" Raised when validation fails on a model."""
Expand Down
2 changes: 1 addition & 1 deletion hermes/handlers/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def get_or_create_user(self, email):
def get_current_user(self):
"""Default global user fetch by user_auth_header."""

# Fetch the email address from the auth_header (e.g. X-NSoT-Email)
# Fetch the email address from the auth_header (e.g. X-Hermes-Email)
auth_header = settings.user_auth_header
log.debug(' fetching auth_header: %s' % auth_header)
email = self.request.headers.get(auth_header)
Expand Down
2 changes: 1 addition & 1 deletion hermes/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __getattr__(self, name):
"database": None,
"debug": False,
"port": 8990,
"user_auth_header": "X-NSoT-Email",
"user_auth_header": "X-Hermes-Email",
"restrict_networks": [],
"bind_address": None,
"api_xsrf_enabled": True,
Expand Down
2 changes: 1 addition & 1 deletion hermes/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.4.4"
__version__ = "0.1.0"
49 changes: 49 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/usr/bin/env python

import os

import setuptools
from distutils.core import setup

execfile('hermes/version.py')

with open('requirements.txt') as requirements:
required = requirements.read().splitlines()

package_data = {}
def get_package_data(package, base_dir):
for dirpath, dirnames, filenames in os.walk(base_dir):
dirpath = dirpath[len(package)+1:] # Strip package dir
for filename in filenames:
package_data.setdefault(package, []).append(os.path.join(dirpath, filename))
for dirname in dirnames:
get_package_data(package, dirname)

get_package_data("hermes", "hermes/static")
get_package_data("hermes", "hermes/templates")
get_package_data("hermes", "hermes/migrations")

kwargs = {
"name": "hermes",
"version": str(__version__),
"packages": ["hermes", "hermes.handlers"],
"package_data": package_data,
"scripts": ["bin/hermes-server", "bin/hermes"],
"description": "Hermes Event Management and Autotasker",
"author": "Digant C Kasundra",
"maintainer": "Digant C Kasundra",
"author_email": "digant@dropbox.com",
"maintainer_email": "digant@dropbox.com",
"license": "Apache",
"install_requires": required,
"url": "https://github.com/dropbox/hermes",
"download_url": "https://github.com/dropbox/hermes/archive/master.tar.gz",
"classifiers": [
"Programming Language :: Python",
"Topic :: Software Development",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
]
}

setup(**kwargs)

0 comments on commit 050256a

Please sign in to comment.