From 9727711405d9c450b23e0254d95c3e30efdf8600 Mon Sep 17 00:00:00 2001 From: Jonathan Helmus Date: Tue, 28 Jul 2015 13:42:02 -0500 Subject: [PATCH] Removed __check_build directory --- bento.info | 3 -- skimage/__check_build/README | 34 ------------------- skimage/__check_build/__init__.py | 47 -------------------------- skimage/__check_build/_check_build.pyx | 2 -- skimage/__check_build/setup.py | 29 ---------------- skimage/setup.py | 1 - 6 files changed, 116 deletions(-) delete mode 100644 skimage/__check_build/README delete mode 100644 skimage/__check_build/__init__.py delete mode 100644 skimage/__check_build/_check_build.pyx delete mode 100644 skimage/__check_build/setup.py diff --git a/bento.info b/bento.info index 81910d34..659247d1 100644 --- a/bento.info +++ b/bento.info @@ -38,9 +38,6 @@ Library: skimage.io._plugins, skimage.measure, skimage.morphology, skimage.scripts, skimage.restoration, skimage.segmentation, skimage.transform, skimage.util - Extension: skimage.__check_build._check_build - Sources: - skimage/__check_build/_check_build.pyx Extension: skimage.io._plugins._colormixer Sources: skimage/io/_plugins/_colormixer.pyx diff --git a/skimage/__check_build/README b/skimage/__check_build/README deleted file mode 100644 index 2c7ba992..00000000 --- a/skimage/__check_build/README +++ /dev/null @@ -1,34 +0,0 @@ -Files in this directory are derived from the scikit-learn project with the -following license: - -New BSD License - -Copyright (c) 2007–2014 The scikit-learn developers. -All rights reserved. - - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - - a. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. - b. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - c. Neither the name of the Scikit-learn Developers nor the names of - its contributors may be used to endorse or promote products - derived from this software without specific prior written - permission. - - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE FOR - ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH - DAMAGE. diff --git a/skimage/__check_build/__init__.py b/skimage/__check_build/__init__.py deleted file mode 100644 index 81cd7bd6..00000000 --- a/skimage/__check_build/__init__.py +++ /dev/null @@ -1,47 +0,0 @@ -""" Module to give helpful messages to the user that did not -compile scikit-image properly. -This checking code was stolen from scikit-learn & pyart. -""" -import os - -INPLACE_MSG = """ -It appears that you are importing a local scikit-image source tree. For -this, you need to have an inplace install. Maybe you are in the source -directory and you need to try from another location.""" - -STANDARD_MSG = """ -If you have used an installer, please check that it is suited for your -Python version, your operating system and your platform.""" - - -def raise_build_error(e): - # Raise a comprehensible error and list the contents of the - # directory to help debugging on the mailing list. - local_dir = os.path.split(__file__)[0] - msg = STANDARD_MSG - if local_dir == "skimage/__check_build": - # Picking up the local install: this will work only if the - # install is an 'inplace build' - msg = INPLACE_MSG - dir_content = list() - for i, filename in enumerate(os.listdir(local_dir)): - if ((i + 1) % 3): - dir_content.append(filename.ljust(26)) - else: - dir_content.append(filename + '\n') - raise ImportError("""%s -___________________________________________________________________________ -Contents of %s: -%s -___________________________________________________________________________ -It seems that scikit-image has not been built correctly. - -If you have installed scikit-image from source, please do not forget -to build the package before using it: run `python setup.py install` or -`make` in the source directory. -%s""" % (e, local_dir, ''.join(dir_content).strip(), msg)) - -try: - from ._check_build import check_build -except ImportError as e: - raise_build_error(e) diff --git a/skimage/__check_build/_check_build.pyx b/skimage/__check_build/_check_build.pyx deleted file mode 100644 index 0409e73f..00000000 --- a/skimage/__check_build/_check_build.pyx +++ /dev/null @@ -1,2 +0,0 @@ -def check_build(): - return diff --git a/skimage/__check_build/setup.py b/skimage/__check_build/setup.py deleted file mode 100644 index 991cf916..00000000 --- a/skimage/__check_build/setup.py +++ /dev/null @@ -1,29 +0,0 @@ -#!/usr/bin/env python - -import os - -from skimage._build import cython - -base_path = os.path.abspath(os.path.dirname(__file__)) - - -def configuration(parent_package='', top_path=None): - from numpy.distutils.misc_util import Configuration - - config = Configuration('__check_build', parent_package, top_path) - - cython(['_check_build.pyx'], working_path=base_path) - config.add_extension('_check_build', - sources=['_check_build.c']) - return config - -if __name__ == '__main__': - from numpy.distutils.core import setup - setup(maintainer='scikit-image Developers', - author='scikit-image Developers', - maintainer_email='scikit-image@googlegroups.com', - description='Build Check', - url='https://github.com/scikit-image/scikit-image', - license='SciPy License (BSD Style)', - **(configuration(top_path='').todict()) - ) diff --git a/skimage/setup.py b/skimage/setup.py index f28afb21..b33f5e81 100644 --- a/skimage/setup.py +++ b/skimage/setup.py @@ -6,7 +6,6 @@ def configuration(parent_package='', top_path=None): config = Configuration('skimage', parent_package, top_path) - config.add_subpackage('__check_build') config.add_subpackage('_shared') config.add_subpackage('color') config.add_subpackage('data')