File tree Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Expand file tree Collapse file tree 2 files changed +13
-4
lines changed Original file line number Diff line number Diff line change 11Scrapely release notes
22======================
33
4+ 0.13.1 (2016-12-21)
5+ -------------------
6+
7+ - Remove numpy as a mandatory import in setup.py
8+
490.13.0 (2016-12-21)
5- ------------
10+ -------------------
611
712- Python 3 support;
813- fixed incorrect webpage encoding detection;
Original file line number Diff line number Diff line change 33import platform
44from setuptools import setup , find_packages
55from setuptools .extension import Extension
6- import numpy as np
76
87
98USE_CYTHON = 'CYTHONIZE' in os .environ
109IS_PYPY = platform .python_implementation () == 'PyPy'
1110ext = '.pyx' if USE_CYTHON else '.c'
11+ try :
12+ import numpy as np
13+ include_dirs = [np .get_include ()]
14+ except ImportError :
15+ include_dirs = []
1216extensions = [
1317 Extension ("scrapely._htmlpage" ,
1418 ["scrapely/_htmlpage%s" % ext ],
15- include_dirs = [ np . get_include ()] ),
19+ include_dirs = include_dirs ),
1620 Extension ("scrapely.extraction._similarity" ,
1721 ["scrapely/extraction/_similarity%s" % ext ],
18- include_dirs = [ np . get_include ()] ),
22+ include_dirs = include_dirs ),
1923]
2024if USE_CYTHON and not IS_PYPY :
2125 from Cython .Build import cythonize
You can’t perform that action at this time.
0 commit comments