diff --git a/data/__init__.py b/data/__init__.py index 27bb3965..962d7a88 100644 --- a/data/__init__.py +++ b/data/__init__.py @@ -1,4 +1,5 @@ import json +from pkg_resources import resource_filename __title__ = 'safety-db' __version__ = '2020.4.14' @@ -10,14 +11,14 @@ 'INSECURE_FULL', ) -with open("data/insecure.json") as __f: +with open(resource_filename("safety_db", "insecure.json")) as __f: try: INSECURE = json.loads(__f.read()) except ValueError as e: INSECURE = [] -with open("data/insecure_full.json") as __f: +with open(resource_filename("safety_db", "insecure_full.json")) as __f: try: INSECURE_FULL = json.loads(__f.read()) except ValueError as e: diff --git a/requirements.txt b/requirements.txt index c9743bee..1f80ae3b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,2 +1,3 @@ packaging -parameterized \ No newline at end of file +parameterized +setuptools diff --git a/setup.py b/setup.py index 827e8d1d..0f3afa55 100644 --- a/setup.py +++ b/setup.py @@ -51,7 +51,7 @@ }, packages=['safety_db'], license='Attribution-NonCommercial-ShareAlike 4.0 International', - install_requires=[], + install_requires=['setuptools'], tests_require=tests_require, include_package_data=True, )