@@ -350,22 +350,6 @@ def get_extension(self):
350350 """
351351 return None
352352
353- def get_install_requires (self ):
354- """
355- Get a list of Python packages that we require.
356- pip/easy_install will attempt to download and install this
357- package if it is not installed.
358- """
359- return []
360-
361- def get_setup_requires (self ):
362- """
363- Get a list of Python packages that we require at build time.
364- pip/easy_install will attempt to download and install this
365- package if it is not installed.
366- """
367- return []
368-
369353 def do_custom_build (self ):
370354 """
371355 If a package needs to do extra custom things, such as building a
@@ -521,14 +505,6 @@ def get_package_data(self):
521505 ],
522506 }
523507
524- def get_install_requires (self ):
525- return [
526- "cycler>=0.10" ,
527- "kiwisolver>=1.0.1" ,
528- "pyparsing>=2.0.1,!=2.0.4,!=2.1.2,!=2.1.6" ,
529- "python-dateutil>=2.1" ,
530- ]
531-
532508
533509class SampleData (OptionalPackage ):
534510 """
@@ -568,27 +544,18 @@ def get_package_data(self):
568544 }
569545
570546
571- class Numpy (SetupPackage ):
572- name = "numpy"
573-
574- def add_flags (self , ext ):
575- import numpy as np
576- ext .include_dirs .append (np .get_include ())
577- ext .define_macros .extend ([
578- # Ensure that PY_ARRAY_UNIQUE_SYMBOL is uniquely defined for each
579- # extension.
580- ('PY_ARRAY_UNIQUE_SYMBOL' ,
581- 'MPL_' + ext .name .replace ('.' , '_' ) + '_ARRAY_API' ),
582- ('NPY_NO_DEPRECATED_API' , 'NPY_1_7_API_VERSION' ),
583- # Allow NumPy's printf format specifiers in C++.
584- ('__STDC_FORMAT_MACROS' , 1 ),
585- ])
586-
587- def get_setup_requires (self ):
588- return ['numpy>=1.11' ]
589-
590- def get_install_requires (self ):
591- return ['numpy>=1.11' ]
547+ def add_numpy_flags (ext ):
548+ import numpy as np
549+ ext .include_dirs .append (np .get_include ())
550+ ext .define_macros .extend ([
551+ # Ensure that PY_ARRAY_UNIQUE_SYMBOL is uniquely defined for each
552+ # extension.
553+ ('PY_ARRAY_UNIQUE_SYMBOL' ,
554+ 'MPL_' + ext .name .replace ('.' , '_' ) + '_ARRAY_API' ),
555+ ('NPY_NO_DEPRECATED_API' , 'NPY_1_7_API_VERSION' ),
556+ # Allow NumPy's printf format specifiers in C++.
557+ ('__STDC_FORMAT_MACROS' , 1 ),
558+ ])
592559
593560
594561class LibAgg (SetupPackage ):
@@ -771,7 +738,7 @@ def get_extension(self):
771738 ]
772739 ext = Extension ('matplotlib.ft2font' , sources )
773740 FreeType ().add_flags (ext )
774- Numpy (). add_flags (ext )
741+ add_numpy_flags (ext )
775742 LibAgg ().add_flags (ext , add_sources = False )
776743 return ext
777744
@@ -799,7 +766,7 @@ def get_extension(self):
799766 atleast_version = '1.2' ,
800767 alt_exec = ['libpng-config' , '--ldflags' ],
801768 default_libraries = ['png' , 'z' ])
802- Numpy (). add_flags (ext )
769+ add_numpy_flags (ext )
803770 return ext
804771
805772
@@ -827,7 +794,7 @@ def get_extension(self):
827794 'extern/ttconv/ttutil.cpp'
828795 ]
829796 ext = Extension ('matplotlib.ttconv' , sources )
830- Numpy (). add_flags (ext )
797+ add_numpy_flags (ext )
831798 ext .include_dirs .insert (0 , 'extern' )
832799 return ext
833800
@@ -840,9 +807,8 @@ def get_extension(self):
840807 'src/py_converters.cpp' ,
841808 'src/_path_wrapper.cpp'
842809 ]
843-
844810 ext = Extension ('matplotlib._path' , sources )
845- Numpy (). add_flags (ext )
811+ add_numpy_flags (ext )
846812 LibAgg ().add_flags (ext )
847813 return ext
848814
@@ -858,7 +824,7 @@ def get_extension(self):
858824 'src/py_converters.cpp'
859825 ]
860826 ext = Extension ('matplotlib._image' , sources )
861- Numpy (). add_flags (ext )
827+ add_numpy_flags (ext )
862828 LibAgg ().add_flags (ext )
863829
864830 return ext
@@ -874,7 +840,7 @@ def get_extension(self):
874840 'src/py_converters.cpp' ,
875841 ]
876842 ext = Extension ('matplotlib._contour' , sources )
877- Numpy (). add_flags (ext )
843+ add_numpy_flags (ext )
878844 LibAgg ().add_flags (ext , add_sources = False )
879845 return ext
880846
@@ -886,7 +852,7 @@ def get_extension(self):
886852 sources = ['src/qhull_wrap.c' ]
887853 ext = Extension ('matplotlib._qhull' , sources ,
888854 define_macros = [('MPL_DEVNULL' , os .devnull )])
889- Numpy (). add_flags (ext )
855+ add_numpy_flags (ext )
890856 Qhull ().add_flags (ext )
891857 return ext
892858
@@ -901,7 +867,7 @@ def get_extension(self):
901867 "src/mplutils.cpp"
902868 ]
903869 ext = Extension ('matplotlib._tri' , sources )
904- Numpy (). add_flags (ext )
870+ add_numpy_flags (ext )
905871 return ext
906872
907873
@@ -917,7 +883,7 @@ def get_extension(self):
917883 "src/_backend_agg_wrapper.cpp"
918884 ]
919885 ext = Extension ('matplotlib.backends._backend_agg' , sources )
920- Numpy (). add_flags (ext )
886+ add_numpy_flags (ext )
921887 LibAgg ().add_flags (ext )
922888 FreeType ().add_flags (ext )
923889 return ext
@@ -938,7 +904,7 @@ def get_extension(self):
938904
939905 ext = Extension ('matplotlib.backends._tkagg' , sources )
940906 self .add_flags (ext )
941- Numpy (). add_flags (ext )
907+ add_numpy_flags (ext )
942908 LibAgg ().add_flags (ext , add_sources = False )
943909 return ext
944910
@@ -965,7 +931,6 @@ def get_extension(self):
965931 sources = [
966932 'src/_macosx.m'
967933 ]
968-
969934 ext = Extension ('matplotlib.backends._macosx' , sources )
970935 ext .extra_link_args .extend (['-framework' , 'Cocoa' ])
971936 if platform .python_implementation ().lower () == 'pypy' :
0 commit comments