2012-05-06 21:30:59 +08:00
|
|
|
import os
|
|
|
|
|
|
2011-04-01 06:08:30 +08:00
|
|
|
import numpy
|
2011-09-26 17:29:30 +08:00
|
|
|
from numpy.distutils.misc_util import Configuration
|
2011-04-01 06:08:30 +08:00
|
|
|
|
2011-10-05 16:16:51 +08:00
|
|
|
|
2011-09-26 17:29:30 +08:00
|
|
|
def configuration(parent_package="", top_path=None):
|
|
|
|
|
config = Configuration("tree", parent_package, top_path)
|
2012-05-06 21:30:59 +08:00
|
|
|
libraries = []
|
|
|
|
|
if os.name == 'posix':
|
|
|
|
|
libraries.append('m')
|
2011-09-26 17:29:30 +08:00
|
|
|
config.add_extension("_tree",
|
|
|
|
|
sources=["_tree.c"],
|
2012-05-06 18:41:37 +08:00
|
|
|
include_dirs=[numpy.get_include()],
|
2012-05-06 21:30:59 +08:00
|
|
|
libraries=libraries)
|
2011-04-01 06:08:30 +08:00
|
|
|
|
2011-09-26 17:29:30 +08:00
|
|
|
config.add_subpackage("tests")
|
2011-08-02 18:28:05 +08:00
|
|
|
|
2011-04-01 06:08:30 +08:00
|
|
|
return config
|
|
|
|
|
|
2011-09-26 17:29:30 +08:00
|
|
|
if __name__ == "__main__":
|
2011-04-01 06:08:30 +08:00
|
|
|
from numpy.distutils.core import setup
|
2011-09-26 17:29:30 +08:00
|
|
|
setup(**configuration().todict())
|