diff --git a/setup.py b/setup.py index b371a56ae..e3846d31f 100644 --- a/setup.py +++ b/setup.py @@ -115,36 +115,6 @@ def generate_cython(root, source): raise RuntimeError('Running cythonize failed') -def import_include(module_name): - try: - return __import__(module_name, globals(), locals(), [], 0) - except ImportError: - raise ImportError('Unable to import %s. Create a virtual environment ' - 'and install all dependencies from requirements.txt, ' - 'e.g., run "pip install -r requirements.txt".' % module_name) - - -def copy_include(src, dst, path): - assert os.path.isdir(src) - assert os.path.isdir(dst) - shutil.copytree( - os.path.join(src, path), - os.path.join(dst, path)) - - -def prepare_includes(path): - include_dir = os.path.join(path, 'include') - if os.path.exists(include_dir): - shutil.rmtree(include_dir) - os.mkdir(include_dir) - - numpy = import_include('numpy') - copy_include(numpy.get_include(), include_dir, 'numpy') - - murmurhash = import_include('murmurhash') - copy_include(murmurhash.get_include(), include_dir, 'murmurhash') - - def is_source_release(path): return os.path.exists(os.path.join(path, 'PKG-INFO')) @@ -194,7 +164,6 @@ def setup_package(): if not is_source_release(root): generate_cython(root, 'spacy') - prepare_includes(root) setup( name=about['__name__'],