Build an egg, and create an eddn-gateway script.

Currently can only be run from a directory where ../schemas exists
and is populated...
This commit is contained in:
James Muscat committed 2015-04-04 00:31:17 +01:00
1 parent 2bddaec99b
commit 608ff49723
3 files changed
+44 -3

No files matched your search

+2
View File
@@ -0,0 +1,2 @@
[egg_info]
tag_build = .dev
+36
View File
@@ -0,0 +1,36 @@
from setuptools import setup, find_packages
import re
VERSIONFILE = "src/eddn/__init__.py"
verstr = "unknown"
try:
verstrline = open(VERSIONFILE, "rt").read()
VSRE = r"^__version__ = ['\"]([^'\"]*)['\"]"
mo = re.search(VSRE, verstrline, re.M)
if mo:
verstr = mo.group(1)
except EnvironmentError:
print "unable to find version in %s" % (VERSIONFILE,)
raise RuntimeError("if %s exists, it is required to be well-formed" % (VERSIONFILE,))
setup(
name='eddn',
version=verstr,
description='Elite: Dangerous Data Network',
author='James Muscat',
author_email='muscaat@elite-markets.net',
url='https://github.com/jamesremuscat/eddn',
packages=find_packages('src', exclude=["*.tests"]),
package_dir = {'':'src'},
long_description="""\
The Elite: Dangerous Data Network allows E:D players to share data. Not affiliated with Frontier Developments.
""",
install_requires=["bottle", "enum34", "gevent", "jsonschema", "pyzmq", "simplejson"],
entry_points={
'console_scripts': [
'eddn-gateway = eddn.Gateway:main',
],
}
)
+6 -3
View File
@@ -10,7 +10,6 @@ import urlparse
import zlib
import zmq.green as zmq
from datetime import datetime
from eddn import __version__ as EDDN_VERSION
from eddn.conf import Settings
from eddn.Validator import Validator, ValidationSeverity
@@ -169,7 +168,7 @@ def health_check():
to detect whether the gateway is still alive, and whether it should remain
in the DNS rotation.
"""
return EDDN_VERSION
return Settings.EDDN_VERSION
class MalformedUploadError(Exception):
@@ -181,5 +180,9 @@ class MalformedUploadError(Exception):
pass
if __name__ == '__main__':
def main():
run(host='0.0.0.0', port=8080, server='gevent')
if __name__ == '__main__':
main()