mirror of
https://github.com/gsi-upm/senpy
synced 2024-11-25 01:22: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
|
Sentiment analysis server in Python
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
__version__ = "0.5.4"
|
||||||
|
@ -28,19 +28,20 @@ import gevent
|
|||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
import argparse
|
import argparse
|
||||||
|
import senpy
|
||||||
|
|
||||||
patch_all(thread=False)
|
patch_all(thread=False)
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
parser = argparse.ArgumentParser(description='Run a Senpy server')
|
parser = argparse.ArgumentParser(description='Run a Senpy server')
|
||||||
parser.add_argument('--level',
|
parser.add_argument('--level',
|
||||||
"-l",
|
'-l',
|
||||||
metavar="logging_level",
|
metavar='logging_level',
|
||||||
type=str,
|
type=str,
|
||||||
default="INFO",
|
default="INFO",
|
||||||
help='Logging level')
|
help='Logging level')
|
||||||
parser.add_argument('--debug',
|
parser.add_argument('--debug',
|
||||||
"-d",
|
'-d',
|
||||||
action='store_true',
|
action='store_true',
|
||||||
default=False,
|
default=False,
|
||||||
help='Run the application in debug mode')
|
help='Run the application in debug mode')
|
||||||
@ -60,7 +61,7 @@ def main():
|
|||||||
parser.add_argument('--plugins-folder',
|
parser.add_argument('--plugins-folder',
|
||||||
'-f',
|
'-f',
|
||||||
type=str,
|
type=str,
|
||||||
default="plugins",
|
default='plugins',
|
||||||
help='Where to look for plugins.')
|
help='Where to look for plugins.')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
logging.basicConfig()
|
logging.basicConfig()
|
||||||
@ -72,12 +73,13 @@ def main():
|
|||||||
sp.activate_all()
|
sp.activate_all()
|
||||||
http_server = WSGIServer((args.host, args.port), app)
|
http_server = WSGIServer((args.host, args.port), app)
|
||||||
try:
|
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))
|
args.port))
|
||||||
http_server.serve_forever()
|
http_server.serve_forever()
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
http_server.stop()
|
http_server.stop()
|
||||||
print("Bye!")
|
print('Bye!')
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
main()
|
main()
|
||||||
|
7
setup.py
7
setup.py
@ -15,12 +15,12 @@ except AttributeError:
|
|||||||
install_reqs = [str(ir.req) for ir in install_reqs]
|
install_reqs = [str(ir.req) for ir in install_reqs]
|
||||||
test_reqs = [str(ir.req) for ir in test_reqs]
|
test_reqs = [str(ir.req) for ir in test_reqs]
|
||||||
|
|
||||||
VERSION = "0.5.4"
|
exec(open('senpy/__init__.py').read())
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='senpy',
|
name='senpy',
|
||||||
packages=['senpy'], # this must be the same as the name above
|
packages=['senpy'], # this must be the same as the name above
|
||||||
version=VERSION,
|
version=__version__,
|
||||||
description='''
|
description='''
|
||||||
A sentiment analysis server implementation. Designed to be \
|
A sentiment analysis server implementation. Designed to be \
|
||||||
extendable, so new algorithms and sources can be used.
|
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='J. Fernando Sanchez',
|
||||||
author_email='balkian@gmail.com',
|
author_email='balkian@gmail.com',
|
||||||
url='https://github.com/gsi-upm/senpy', # use the URL to the github repo
|
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'
|
download_url='https://github.com/gsi-upm/senpy/archive/{}.tar.gz' .format(__version__),
|
||||||
.format(VERSION),
|
|
||||||
keywords=['eurosentiment', 'sentiment', 'emotions', 'nif'],
|
keywords=['eurosentiment', 'sentiment', 'emotions', 'nif'],
|
||||||
classifiers=[],
|
classifiers=[],
|
||||||
install_requires=install_reqs,
|
install_requires=install_reqs,
|
||||||
|
Loading…
Reference in New Issue
Block a user