diff --git a/GPy/util/datasets.py b/GPy/util/datasets.py index 7fd1b6c5..32a22d77 100644 --- a/GPy/util/datasets.py +++ b/GPy/util/datasets.py @@ -30,9 +30,12 @@ overide_manual_authorize=False neil_url = 'http://staffwww.dcs.shef.ac.uk/people/N.Lawrence/dataset_mirror/' # Read data resources from json file. -path = os.path.join(os.path.dirname(__file__), 'data_resources.json') -json_data=open(path).read() -data_resources = json.loads(json_data) +# Don't do this when ReadTheDocs is scanning as it breaks things +on_rtd = os.environ.get('READTHEDOCS', None) == 'True' #Checks if RTD is scanning +if not (on_rtd): + path = os.path.join(os.path.dirname(__file__), 'data_resources.json') + json_data=open(path).read() + data_resources = json.loads(json_data) def prompt_user(prompt): diff --git a/setup.py b/setup.py index 3b493022..80f3648a 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,7 @@ setup(name = 'GPy', url = "http://sheffieldml.github.com/GPy/", packages = ['GPy', 'GPy.core', 'GPy.kern', 'GPy.util', 'GPy.models_modules', 'GPy.inference', 'GPy.examples', 'GPy.likelihoods', 'GPy.testing', 'GPy.util.latent_space_visualizations', 'GPy.util.latent_space_visualizations.controllers', 'GPy.likelihoods.noise_models', 'GPy.kern.parts', 'GPy.mappings'], package_dir={'GPy': 'GPy'}, - package_data = {'GPy': ['GPy/examples', 'gpy_config.cfg']}, + package_data = {'GPy': ['GPy/examples', 'gpy_config.cfg', 'util/data_resources.json']}, py_modules = ['GPy.__init__'], long_description=read('README.md'), install_requires=['numpy>=1.6', 'scipy>=0.9','matplotlib>=1.1', 'nose'],