@@ -507,22 +507,6 @@ def get_extension(self):
507
507
"""
508
508
return None
509
509
510
- def get_install_requires (self ):
511
- """
512
- Get a list of Python packages that we require.
513
- pip/easy_install will attempt to download and install this
514
- package if it is not installed.
515
- """
516
- return []
517
-
518
- def get_setup_requires (self ):
519
- """
520
- Get a list of Python packages that we require at build time.
521
- pip/easy_install will attempt to download and install this
522
- package if it is not installed.
523
- """
524
- return []
525
-
526
510
def _check_for_pkg_config (self , package , include_file , min_version = None ,
527
511
version = None ):
528
512
"""
@@ -739,14 +723,6 @@ def get_package_data(self):
739
723
],
740
724
}
741
725
742
- def get_install_requires (self ):
743
- return [
744
- "cycler>=0.10" ,
745
- "kiwisolver>=1.0.1" ,
746
- "pyparsing>=2.0.1,!=2.0.4,!=2.1.2,!=2.1.6" ,
747
- "python-dateutil>=2.1" ,
748
- ]
749
-
750
726
751
727
class SampleData (OptionalPackage ):
752
728
"""
@@ -788,27 +764,18 @@ def get_package_data(self):
788
764
}
789
765
790
766
791
- class Numpy (SetupPackage ):
792
- name = "numpy"
793
-
794
- def add_flags (self , ext ):
795
- import numpy as np
796
- ext .include_dirs .append (np .get_include ())
797
- ext .define_macros .extend ([
798
- # Ensure that PY_ARRAY_UNIQUE_SYMBOL is uniquely defined for each
799
- # extension.
800
- ('PY_ARRAY_UNIQUE_SYMBOL' ,
801
- 'MPL_' + ext .name .replace ('.' , '_' ) + '_ARRAY_API' ),
802
- ('NPY_NO_DEPRECATED_API' , 'NPY_1_7_API_VERSION' ),
803
- # Allow NumPy's printf format specifiers in C++.
804
- ('__STDC_FORMAT_MACROS' , 1 ),
805
- ])
806
-
807
- def get_setup_requires (self ):
808
- return ['numpy>=1.11' ]
809
-
810
- def get_install_requires (self ):
811
- return ['numpy>=1.11' ]
767
+ def add_numpy_flags (ext ):
768
+ import numpy as np
769
+ ext .include_dirs .append (np .get_include ())
770
+ ext .define_macros .extend ([
771
+ # Ensure that PY_ARRAY_UNIQUE_SYMBOL is uniquely defined for each
772
+ # extension.
773
+ ('PY_ARRAY_UNIQUE_SYMBOL' ,
774
+ 'MPL_' + ext .name .replace ('.' , '_' ) + '_ARRAY_API' ),
775
+ ('NPY_NO_DEPRECATED_API' , 'NPY_1_7_API_VERSION' ),
776
+ # Allow NumPy's printf format specifiers in C++.
777
+ ('__STDC_FORMAT_MACROS' , 1 ),
778
+ ])
812
779
813
780
814
781
class LibAgg (SetupPackage ):
@@ -993,7 +960,7 @@ def get_extension(self):
993
960
]
994
961
ext = make_extension ('matplotlib.ft2font' , sources )
995
962
FreeType ().add_flags (ext )
996
- Numpy (). add_flags (ext )
963
+ add_numpy_flags (ext )
997
964
LibAgg ().add_flags (ext , add_sources = False )
998
965
return ext
999
966
@@ -1019,7 +986,7 @@ def get_extension(self):
1019
986
pkg_config .setup_extension (
1020
987
ext , 'libpng' , default_libraries = ['png' , 'z' ],
1021
988
alt_exec = 'libpng-config --ldflags' )
1022
- Numpy (). add_flags (ext )
989
+ add_numpy_flags (ext )
1023
990
return ext
1024
991
1025
992
@@ -1047,7 +1014,7 @@ def get_extension(self):
1047
1014
'extern/ttconv/ttutil.cpp'
1048
1015
]
1049
1016
ext = make_extension ('matplotlib.ttconv' , sources )
1050
- Numpy (). add_flags (ext )
1017
+ add_numpy_flags (ext )
1051
1018
ext .include_dirs .insert (0 , 'extern' )
1052
1019
return ext
1053
1020
@@ -1062,7 +1029,7 @@ def get_extension(self):
1062
1029
]
1063
1030
1064
1031
ext = make_extension ('matplotlib._path' , sources )
1065
- Numpy (). add_flags (ext )
1032
+ add_numpy_flags (ext )
1066
1033
LibAgg ().add_flags (ext )
1067
1034
return ext
1068
1035
@@ -1078,7 +1045,7 @@ def get_extension(self):
1078
1045
'src/py_converters.cpp'
1079
1046
]
1080
1047
ext = make_extension ('matplotlib._image' , sources )
1081
- Numpy (). add_flags (ext )
1048
+ add_numpy_flags (ext )
1082
1049
LibAgg ().add_flags (ext )
1083
1050
1084
1051
return ext
@@ -1094,7 +1061,7 @@ def get_extension(self):
1094
1061
'src/py_converters.cpp' ,
1095
1062
]
1096
1063
ext = make_extension ('matplotlib._contour' , sources )
1097
- Numpy (). add_flags (ext )
1064
+ add_numpy_flags (ext )
1098
1065
LibAgg ().add_flags (ext , add_sources = False )
1099
1066
return ext
1100
1067
@@ -1106,7 +1073,7 @@ def get_extension(self):
1106
1073
sources = ['src/qhull_wrap.c' ]
1107
1074
ext = make_extension ('matplotlib._qhull' , sources ,
1108
1075
define_macros = [('MPL_DEVNULL' , os .devnull )])
1109
- Numpy (). add_flags (ext )
1076
+ add_numpy_flags (ext )
1110
1077
Qhull ().add_flags (ext )
1111
1078
return ext
1112
1079
@@ -1121,7 +1088,7 @@ def get_extension(self):
1121
1088
"src/mplutils.cpp"
1122
1089
]
1123
1090
ext = make_extension ('matplotlib._tri' , sources )
1124
- Numpy (). add_flags (ext )
1091
+ add_numpy_flags (ext )
1125
1092
return ext
1126
1093
1127
1094
@@ -1137,7 +1104,7 @@ def get_extension(self):
1137
1104
"src/_backend_agg_wrapper.cpp"
1138
1105
]
1139
1106
ext = make_extension ('matplotlib.backends._backend_agg' , sources )
1140
- Numpy (). add_flags (ext )
1107
+ add_numpy_flags (ext )
1141
1108
LibAgg ().add_flags (ext )
1142
1109
FreeType ().add_flags (ext )
1143
1110
return ext
@@ -1158,7 +1125,7 @@ def get_extension(self):
1158
1125
1159
1126
ext = make_extension ('matplotlib.backends._tkagg' , sources )
1160
1127
self .add_flags (ext )
1161
- Numpy (). add_flags (ext )
1128
+ add_numpy_flags (ext )
1162
1129
LibAgg ().add_flags (ext , add_sources = False )
1163
1130
return ext
1164
1131
0 commit comments