Skip to content

Commit d9a21b8

Browse files
committed
suppress deprecated warning
these warnings (resulted in python headers) cause build failure, suppress them to fix the build. Signed-off-by: Hui Peng <benquike@gmail.com>
1 parent 31b5881 commit d9a21b8

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

setup.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,28 @@
44
from setuptools import setup, find_packages
55
from setuptools.extension import Extension
66

7-
87
USE_CYTHON = 'CYTHONIZE' in os.environ
98
IS_PYPY = platform.python_implementation() == 'PyPy'
109
ext = '.pyx' if USE_CYTHON else '.c'
1110
try:
1211
import numpy as np
1312
include_dirs = [np.get_include()]
1413
except ImportError:
15-
include_dirs = []
14+
print('import error')
15+
1616
extensions = [
1717
Extension("scrapely._htmlpage",
1818
["scrapely/_htmlpage%s" % ext],
19-
include_dirs=include_dirs),
19+
include_dirs=include_dirs,
20+
extra_compile_args=[
21+
'-Wno-deprecated-declarations',
22+
'-Wno-int-conversion']),
2023
Extension("scrapely.extraction._similarity",
2124
["scrapely/extraction/_similarity%s" % ext],
22-
include_dirs=include_dirs),
25+
include_dirs=include_dirs,
26+
extra_compile_args=[
27+
'-Wno-deprecated-declarations',
28+
'-Wno-int-conversion']),
2329
]
2430
if USE_CYTHON and not IS_PYPY:
2531
from Cython.Build import cythonize

0 commit comments

Comments
 (0)