mirror of
https://github.com/wassname/scikit-image.git
synced 2026-09-11 12:43:04 +08:00
Fix setup.py cascade
This commit is contained in:
@@ -0,0 +1,30 @@
|
|||||||
|
#!/usr/bin/env python
|
||||||
|
|
||||||
|
from skimage._build import cython
|
||||||
|
import os.path
|
||||||
|
|
||||||
|
base_path = os.path.abspath(os.path.dirname(__file__))
|
||||||
|
|
||||||
|
|
||||||
|
def configuration(parent_package='', top_path=None):
|
||||||
|
from numpy.distutils.misc_util import Configuration, get_numpy_include_dirs
|
||||||
|
|
||||||
|
config = Configuration('graph', parent_package, top_path)
|
||||||
|
config.add_data_dir('tests')
|
||||||
|
|
||||||
|
# This function tries to create C files from the given .pyx files. If
|
||||||
|
# it fails, try to build with pre-generated .c files.
|
||||||
|
cython(['_ncut_cy.pyx'], working_path=base_path)
|
||||||
|
config.add_extension('_ncut_cy', sources=['_ncut_cy.c'],
|
||||||
|
include_dirs=[get_numpy_include_dirs()])
|
||||||
|
return config
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
from numpy.distutils.core import setup
|
||||||
|
setup(maintainer='scikit-image Developers',
|
||||||
|
maintainer_email='scikit-image@googlegroups.com',
|
||||||
|
description='Graph-based Image-processing Algorithms',
|
||||||
|
url='https://github.com/scikit-image/scikit-image',
|
||||||
|
license='Modified BSD',
|
||||||
|
**(configuration(top_path='').todict())
|
||||||
|
)
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
|
||||||
|
def configuration(parent_package='skimage', top_path=None):
|
||||||
|
from numpy.distutils.misc_util import Configuration
|
||||||
|
config = Configuration('future', parent_package, top_path)
|
||||||
|
config.add_subpackage('graph')
|
||||||
|
return config
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
from numpy.distutils.core import setup
|
||||||
|
|
||||||
|
config = configuration(top_path='').todict()
|
||||||
|
setup(**config)
|
||||||
@@ -17,7 +17,6 @@ def configuration(parent_package='', top_path=None):
|
|||||||
cython(['_spath.pyx'], working_path=base_path)
|
cython(['_spath.pyx'], working_path=base_path)
|
||||||
cython(['_mcp.pyx'], working_path=base_path)
|
cython(['_mcp.pyx'], working_path=base_path)
|
||||||
cython(['heap.pyx'], working_path=base_path)
|
cython(['heap.pyx'], working_path=base_path)
|
||||||
cython(['_ncut_cy.pyx'], working_path=base_path)
|
|
||||||
|
|
||||||
config.add_extension('_spath', sources=['_spath.c'],
|
config.add_extension('_spath', sources=['_spath.c'],
|
||||||
include_dirs=[get_numpy_include_dirs()])
|
include_dirs=[get_numpy_include_dirs()])
|
||||||
@@ -25,8 +24,6 @@ def configuration(parent_package='', top_path=None):
|
|||||||
include_dirs=[get_numpy_include_dirs()])
|
include_dirs=[get_numpy_include_dirs()])
|
||||||
config.add_extension('heap', sources=['heap.c'],
|
config.add_extension('heap', sources=['heap.c'],
|
||||||
include_dirs=[get_numpy_include_dirs()])
|
include_dirs=[get_numpy_include_dirs()])
|
||||||
config.add_extension('_ncut_cy', sources=['_ncut_cy.c'],
|
|
||||||
include_dirs=[get_numpy_include_dirs()])
|
|
||||||
return config
|
return config
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ def configuration(parent_package='', top_path=None):
|
|||||||
config.add_subpackage('feature')
|
config.add_subpackage('feature')
|
||||||
config.add_subpackage('restoration')
|
config.add_subpackage('restoration')
|
||||||
config.add_subpackage('filters')
|
config.add_subpackage('filters')
|
||||||
|
config.add_subpackage('future')
|
||||||
config.add_subpackage('graph')
|
config.add_subpackage('graph')
|
||||||
config.add_subpackage('io')
|
config.add_subpackage('io')
|
||||||
config.add_subpackage('measure')
|
config.add_subpackage('measure')
|
||||||
|
|||||||
Reference in New Issue
Block a user