__version__ in the module itself

pull/8/head
J. Fernando Sánchez 8 years ago
parent 56fef9e835
commit 407d17b2b9

@ -17,3 +17,5 @@
"""
Sentiment analysis server in Python
"""
__version__ = "0.5.4"

@ -28,19 +28,20 @@ import gevent
import logging
import os
import argparse
import senpy
patch_all(thread=False)
def main():
parser = argparse.ArgumentParser(description='Run a Senpy server')
parser.add_argument('--level',
"-l",
metavar="logging_level",
'-l',
metavar='logging_level',
type=str,
default="INFO",
help='Logging level')
parser.add_argument('--debug',
"-d",
'-d',
action='store_true',
default=False,
help='Run the application in debug mode')
@ -60,7 +61,7 @@ def main():
parser.add_argument('--plugins-folder',
'-f',
type=str,
default="plugins",
default='plugins',
help='Where to look for plugins.')
args = parser.parse_args()
logging.basicConfig()
@ -72,12 +73,13 @@ def main():
sp.activate_all()
http_server = WSGIServer((args.host, args.port), app)
try:
print("Server running on port %s:%d. Ctrl+C to quit" % (args.host,
print('Senpy version {}'.format(senpy.__version__))
print('Server running on port %s:%d. Ctrl+C to quit' % (args.host,
args.port))
http_server.serve_forever()
except KeyboardInterrupt:
http_server.stop()
print("Bye!")
print('Bye!')
if __name__ == '__main__':
main()

@ -15,12 +15,12 @@ except AttributeError:
install_reqs = [str(ir.req) for ir in install_reqs]
test_reqs = [str(ir.req) for ir in test_reqs]
VERSION = "0.5.4"
exec(open('senpy/__init__.py').read())
setup(
name='senpy',
packages=['senpy'], # this must be the same as the name above
version=VERSION,
version=__version__,
description='''
A sentiment analysis server implementation. Designed to be \
extendable, so new algorithms and sources can be used.
@ -28,8 +28,7 @@ extendable, so new algorithms and sources can be used.
author='J. Fernando Sanchez',
author_email='balkian@gmail.com',
url='https://github.com/gsi-upm/senpy', # use the URL to the github repo
download_url='https://github.com/gsi-upm/senpy/archive/{}.tar.gz'
.format(VERSION),
download_url='https://github.com/gsi-upm/senpy/archive/{}.tar.gz' .format(__version__),
keywords=['eurosentiment', 'sentiment', 'emotions', 'nif'],
classifiers=[],
install_requires=install_reqs,

Loading…
Cancel
Save