Commit 92147993 authored by Robert Bradshaw's avatar Robert Bradshaw

Suppress deprecation warning from setuptools import.

parent d676b62b
...@@ -7,6 +7,7 @@ building Cython extension modules.""" ...@@ -7,6 +7,7 @@ building Cython extension modules."""
__revision__ = "$Id:$" __revision__ = "$Id:$"
import inspect
import sys import sys
import os import os
from distutils.errors import DistutilsPlatformError from distutils.errors import DistutilsPlatformError
...@@ -16,9 +17,14 @@ from distutils.command import build_ext as _build_ext ...@@ -16,9 +17,14 @@ from distutils.command import build_ext as _build_ext
from distutils import sysconfig from distutils import sysconfig
import warnings import warnings
warnings.warn( try:
"Cython.Distutils.build_ext does not properly handle dependencies " from_setuptools = 'setuptools/extension.py' in inspect.getouterframes(inspect.currentframe(), 2)[2][1]
"and is deprectated. Use Cython.Build.build_ext instead.") except Exception:
from_setuptools = False
if not from_setuptools:
warnings.warn(
"Cython.Distutils.build_ext does not properly handle dependencies "
"and is deprectated. Use Cython.Build.build_ext instead.")
try: try:
from __builtin__ import basestring from __builtin__ import basestring
......
...@@ -12,9 +12,6 @@ import sys ...@@ -12,9 +12,6 @@ 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'
......
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