Fixed loading problem for schema json
This commit is contained in:
@@ -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)
|
||||
|
||||
3
setup.py
3
setup.py
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user