Skip to content

Commit

Permalink
Make sure annif.yaml is included in installed package. Fixes #199
Browse files Browse the repository at this point in the history
  • Loading branch information
osma committed Nov 6, 2018
1 parent 5cac0b6 commit 8931c27
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 197 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
include annif/swagger/annif.yaml
4 changes: 3 additions & 1 deletion annif/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python3

import os
import os.path
import logging
import connexion
from flask_cors import CORS
Expand All @@ -14,7 +15,8 @@ def create_app(script_info=None, config_name=None):
# 'cxapp' here is the Connexion application that has a normal Flask app
# as a property (cxapp.app)

cxapp = connexion.App(__name__, specification_dir='../swagger/')
specdir = os.path.join(os.path.dirname(__file__), 'swagger')
cxapp = connexion.App(__name__, specification_dir=specdir)
if config_name is None:
config_name = os.environ.get('ANNIF_CONFIG')
if config_name is None:
Expand Down
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ def read(fname):
long_description=read('README.md'),
long_description_content_type='text/markdown',
packages=find_packages(),
include_package_data=True,
zip_safe=False,
install_requires=[
'connexion',
'flask-cors',
Expand Down
196 changes: 0 additions & 196 deletions swagger/annif.yaml

This file was deleted.

0 comments on commit 8931c27

Please sign in to comment.