diff --git a/GPy/util/config.py b/GPy/util/config.py index 28007fdf..6dad46c8 100644 --- a/GPy/util/config.py +++ b/GPy/util/config.py @@ -8,9 +8,9 @@ config = ConfigParser.ConfigParser() # This is the default configuration file that always needs to be present. default_file = os.path.abspath(os.path.join(os.path.dirname( __file__ ), '..', 'defaults.cfg')) -# These files are optional +# These files are optional # This specifies configurations that are typically specific to the machine (it is found alongside the GPy installation). -local_file = os.path.abspath(os.path.join(os.path.dirname( __file__ ), '..', 'machine.cfg')) +local_file = os.path.abspath(os.path.join(os.path.dirname( __file__ ), '..', 'installation.cfg')) # This specifies configurations specific to the user (it is found in the user home directory) home = os.getenv('HOME') or os.getenv('USERPROFILE') diff --git a/MANIFEST.in b/MANIFEST.in index c89284cd..bcbf3583 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -2,3 +2,7 @@ include *.txt recursive-include doc *.txt include *.md recursive-include doc *.md +include *.cfg +recursive-include doc *.cfg +include *.json +recursive-include doc *.json diff --git a/setup.py b/setup.py index ace1d8b2..a89dc926 100644 --- a/setup.py +++ b/setup.py @@ -1,14 +1,16 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -import os +#import os from setuptools import setup # Version number version = '0.4.6' +from pkg_resources import Requirement, resource_string def read(fname): - return open(os.path.join(os.path.dirname(__file__), fname)).read() + return resource_string(Requirement.parse("GPy"),fname) + #return open(os.path.join(os.path.dirname(__file__), fname)).read() setup(name = 'GPy', version = version, @@ -20,7 +22,7 @@ setup(name = 'GPy', url = "http://sheffieldml.github.com/GPy/", packages = ["GPy.models", "GPy.inference.optimization", "GPy.inference", "GPy.inference.latent_function_inference", "GPy.likelihoods", "GPy.mappings", "GPy.examples", "GPy.core.parameterization", "GPy.core", "GPy.testing", "GPy", "GPy.util", "GPy.kern", "GPy.kern._src.psi_comp", "GPy.kern._src", "GPy.plotting.matplot_dep.latent_space_visualizations.controllers", "GPy.plotting.matplot_dep.latent_space_visualizations", "GPy.plotting.matplot_dep", "GPy.plotting"], package_dir={'GPy': 'GPy'}, - package_data = {'GPy': ['GPy/examples']}, + package_data = {'GPy': ['defaults.cfg', 'installation.cfg', 'util/data_resources.json', 'util/football_teams.json']}, py_modules = ['GPy.__init__'], long_description=read('README.md'), install_requires=['numpy>=1.6', 'scipy>=0.9','matplotlib>=1.1', 'nose'], @@ -29,4 +31,5 @@ setup(name = 'GPy', }, classifiers=[ "License :: OSI Approved :: BSD License"], + zip_safe = False )