GPy/setup.py

93 lines
3.8 KiB
Python
Raw Normal View History

2012-11-29 16:24:48 +00:00
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
2015-04-27 14:21:46 +01:00
from setuptools import setup, Extension
import numpy as np
2012-11-29 16:24:48 +00:00
def read(fname):
2014-07-29 22:51:11 +01:00
return open(os.path.join(os.path.dirname(__file__), fname)).read()
2012-11-29 16:24:48 +00:00
version_dummy = {}
exec(read('GPy/__version__.py'), version_dummy)
__version__ = version_dummy['__version__']
del version_dummy
2015-09-09 09:28:42 +01:00
2015-09-07 13:38:11 +01:00
#Mac OS X Clang doesn't support OpenMP th the current time.
#This detects if we are building on a Mac
def ismac():
platform = sys.platform
ismac = False
if platform[:6] == 'darwin':
ismac = True
return ismac
if ismac():
compile_flags = [ '-O3', ]
2015-09-08 21:38:48 +01:00
link_args = []
2015-09-07 13:38:11 +01:00
else:
compile_flags = [ '-fopenmp', '-O3', ]
link_args = ['-lgomp']
2015-04-27 14:21:46 +01:00
ext_mods = [Extension(name='GPy.kern._src.stationary_cython',
sources=['GPy/kern/_src/stationary_cython.c','GPy/kern/_src/stationary_utils.c'],
include_dirs=[np.get_include()],
extra_compile_args=compile_flags,
2015-09-07 13:38:11 +01:00
extra_link_args = link_args),
2015-04-27 19:47:19 +01:00
Extension(name='GPy.util.choleskies_cython',
sources=['GPy/util/choleskies_cython.c'],
2015-08-17 15:04:43 +01:00
include_dirs=[np.get_include()],
2015-09-07 13:38:11 +01:00
extra_link_args = link_args,
2015-08-17 15:04:43 +01:00
extra_compile_args=compile_flags),
2015-04-28 14:57:00 +01:00
Extension(name='GPy.util.linalg_cython',
sources=['GPy/util/linalg_cython.c'],
include_dirs=[np.get_include()],
extra_compile_args=compile_flags),
2015-04-27 16:00:42 +01:00
Extension(name='GPy.kern._src.coregionalize_cython',
2015-04-27 19:47:19 +01:00
sources=['GPy/kern/_src/coregionalize_cython.c'],
2015-04-27 16:00:42 +01:00
include_dirs=[np.get_include()],
extra_compile_args=compile_flags)]
2015-04-27 14:21:46 +01:00
2012-11-29 16:24:48 +00:00
setup(name = 'GPy',
2015-09-09 08:58:01 +01:00
version = __version__,
author = read('AUTHORS.txt'),
author_email = "gpy.authors@gmail.com",
2012-11-29 16:24:48 +00:00
description = ("The Gaussian Process Toolbox"),
license = "BSD 3-clause",
keywords = "machine-learning gaussian-processes kernels",
url = "http://sheffieldml.github.com/GPy/",
2015-04-27 14:21:46 +01:00
ext_modules = ext_mods,
2014-11-05 16:31:22 +00:00
packages = ["GPy.models",
"GPy.inference.optimization",
2014-11-11 09:56:15 +00:00
"GPy.inference.mcmc",
2014-11-05 16:31:22 +00:00
"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"],
2012-11-29 16:24:48 +00:00
package_dir={'GPy': 'GPy'},
2014-11-11 09:56:15 +00:00
package_data = {'GPy': ['defaults.cfg', 'installation.cfg',
'util/data_resources.json',
2015-09-09 09:28:42 +01:00
'util/football_teams.json',
]},
2014-11-11 09:56:15 +00:00
include_package_data = True,
2012-11-29 16:24:48 +00:00
py_modules = ['GPy.__init__'],
2014-11-11 09:56:15 +00:00
test_suite = 'GPy.testing',
2012-12-06 10:16:19 -08:00
long_description=read('README.md'),
install_requires=['numpy>=1.7', 'scipy>=0.16'],
2014-11-11 09:56:15 +00:00
extras_require = {'docs':['matplotlib >=1.3','Sphinx','IPython']},
classifiers=['License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Operating System :: MacOS :: MacOS X',
'Operating System :: Microsoft :: Windows',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 2.7',
'Topic :: Scientific/Engineering :: Artificial Intelligence']
2012-11-29 16:24:48 +00:00
)