diff options
-rw-r--r-- | jsonschema/_utils.py | 5 | ||||
-rw-r--r-- | setup.py | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/jsonschema/_utils.py b/jsonschema/_utils.py index 7e748cb..10e7bf8 100644 --- a/jsonschema/_utils.py +++ b/jsonschema/_utils.py @@ -43,7 +43,10 @@ def load_schema(name): Load a schema from ./schemas/``name``.json and return it. """ - schemadir = os.path.join(os.path.dirname(__file__), 'schemas') + schemadir = os.path.join( + os.path.dirname(os.path.abspath(__file__)), + 'schemas' + ) schemapath = os.path.join(schemadir, '%s.json' % (name,)) with open(schemapath) as f: return json.load(f) @@ -1,3 +1,5 @@ +import os +import glob from distutils.core import setup from jsonschema import __version__ @@ -29,6 +31,7 @@ setup( name="jsonschema", version=__version__, packages=["jsonschema"], + package_data={'jsonschema': ['schemas/*.json']}, author="Julian Berman", author_email="Julian@GrayVines.com", classifiers=classifiers, |