mirror of
https://github.com/gsi-upm/senpy
synced 2024-11-21 15:52:28 +00:00
__version__ in the module itself
This commit is contained in:
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()
|
||||
|
7
setup.py
7
setup.py
@ -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…
Reference in New Issue
Block a user