diff --git a/.gitignore b/.gitignore index ccb5c841..70768784 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ dist.zip /docs/build *_cache /kwic/node_modules +PYPI_TOKEN.txt diff --git a/concordancer/server.py b/concordancer/server.py index a4404041..5e777508 100644 --- a/concordancer/server.py +++ b/concordancer/server.py @@ -131,7 +131,7 @@ def on_get(self, req, resp): cqls.parse(cql) except: resp.status = falcon.HTTP_400 - resp.body = 'CQL Syntax error' + resp.text = 'CQL Syntax error' # Query Database self.concord_list = list( @@ -147,7 +147,7 @@ def on_get(self, req, resp): print(f"Found {len(self.concord_list)} results...\n") ############ _DEBUGGING ############## resp.status = falcon.HTTP_200 # This is the default status - resp.body = json.dumps({ + resp.text = json.dumps({ 'results': self.concord_list, 'default_attr': self.C._cql_default_attr }, ensure_ascii=False) @@ -166,7 +166,7 @@ def on_get_export(self, req, resp): ----- Sends the most recent queried results back to the front-end in JSON """ - resp.body = json.dumps(self.concord_list, ensure_ascii=False, indent="\t") + resp.text = json.dumps(self.concord_list, ensure_ascii=False, indent="\t") ######################################## diff --git a/pypi.sh b/pypi.sh index 5c546dea..2a0b4d48 100644 --- a/pypi.sh +++ b/pypi.sh @@ -1,3 +1,12 @@ -python3 setup.py sdist bdist_wheel && -twine upload dist/* -rm -r build/ dist/ concordancer.egg-info/ +if [ "$OSTYPE" == "msys" ]; then + bc() { + /c/Users/rd/bin/unix/bc/bin/bc.exe "$@" + } +fi + +# Build package +[[ -d build/ ]] && rm -r build/ +[[ -d dist/ ]] && rm -r dist/ +[[ -d nutrical.egg-info/ ]] && rm -r nutrical.egg-info/ +python setup.py sdist bdist_wheel && +twine upload --verbose --repository pypi dist/* diff --git a/setup.py b/setup.py index 369207e8..960c1d05 100644 --- a/setup.py +++ b/setup.py @@ -4,7 +4,7 @@ long_description = f.read().strip() setup(name='concordancer', - version='0.1.14', + version='0.1.15', description='Extract concordance lines from corpus with CQL', long_description=long_description, long_description_content_type='text/markdown',