Skip to content

Commit 8055017

Browse files
committed
Use numpy versions of setup, Extensions if they are available.
So as not to break anything.
1 parent 5a027f0 commit 8055017

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

setup.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
if major==2 and minor1<4 or major<2:
55
raise SystemExit("""matplotlib and the basemap toolkit require Python 2.4 or later.""")
66

7-
from distutils.core import setup, Extension
87
from distutils.dist import Distribution
98
from distutils.util import convert_path
109
from distutils import ccompiler, sysconfig
@@ -14,10 +13,12 @@
1413
inc_dirs = []
1514
if any('--' + opt in sys.argv for opt in Distribution.display_option_names +
1615
['help-commands', 'help']) or sys.argv[1] == 'egg_info':
17-
pass
16+
from distutils.core import setup, Extension
1817
else:
19-
# append numpy include dir.
2018
import numpy
19+
# Use numpy versions if they are available.
20+
from numpy.distutils.core import setup, Extension
21+
# append numpy include dir.
2122
inc_dirs.append(numpy.get_include())
2223

2324
try:

0 commit comments

Comments
 (0)