Commit d676b62b authored by Robert Bradshaw's avatar Robert Bradshaw

Suppress deprecation warning for Cython install.

parent 9f9174b2
...@@ -6,7 +6,7 @@ if 'setuptools' in sys.modules: ...@@ -6,7 +6,7 @@ if 'setuptools' in sys.modules:
else: else:
from distutils.command import build_ext as _build_ext from distutils.command import build_ext as _build_ext
class build_ext(_build_ext.build_ext): class build_ext(_build_ext.build_ext, object):
def finalize_options(self): def finalize_options(self):
self.distribution.ext_modules[:] = cythonize( self.distribution.ext_modules[:] = cythonize(
self.distribution.ext_modules) self.distribution.ext_modules)
......
...@@ -12,6 +12,9 @@ import sys ...@@ -12,6 +12,9 @@ import sys
import platform import platform
is_cpython = platform.python_implementation() == 'CPython' is_cpython = platform.python_implementation() == 'CPython'
# Suppress warning.
sys.modules[Extension.__module__].have_pyrex = lambda : True
if sys.platform == "darwin": if sys.platform == "darwin":
# Don't create resource files on OS X tar. # Don't create resource files on OS X tar.
os.environ['COPY_EXTENDED_ATTRIBUTES_DISABLE'] = 'true' os.environ['COPY_EXTENDED_ATTRIBUTES_DISABLE'] = 'true'
...@@ -167,7 +170,7 @@ def compile_cython_modules(profile=False, compile_more=False, cython_with_refnan ...@@ -167,7 +170,7 @@ def compile_cython_modules(profile=False, compile_more=False, cython_with_refnan
# XXX hack around setuptools quirk for '*.pyx' sources # XXX hack around setuptools quirk for '*.pyx' sources
extensions[-1].sources[0] = pyx_source_file extensions[-1].sources[0] = pyx_source_file
from Cython.Distutils import build_ext from Cython.Build import build_ext
if sys.version_info[:2] == (3, 2): if sys.version_info[:2] == (3, 2):
# Python 3.2: can only run Cython *after* running 2to3 # Python 3.2: can only run Cython *after* running 2to3
build_ext = _defer_cython_import_in_py32(build_ext, source_root, profile) build_ext = _defer_cython_import_in_py32(build_ext, source_root, profile)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment