@@ -360,22 +360,6 @@ def get_extension(self):
360360 """
361361 return None
362362
363- def get_install_requires (self ):
364- """
365- Get a list of Python packages that we require.
366- pip/easy_install will attempt to download and install this
367- package if it is not installed.
368- """
369- return []
370-
371- def get_setup_requires (self ):
372- """
373- Get a list of Python packages that we require at build time.
374- pip/easy_install will attempt to download and install this
375- package if it is not installed.
376- """
377- return []
378-
379363 def do_custom_build (self ):
380364 """
381365 If a package needs to do extra custom things, such as building a
@@ -551,14 +535,6 @@ def get_package_data(self):
551535 ],
552536 }
553537
554- def get_install_requires (self ):
555- return [
556- "cycler>=0.10" ,
557- "kiwisolver>=1.0.1" ,
558- "pyparsing>=2.0.1,!=2.0.4,!=2.1.2,!=2.1.6" ,
559- "python-dateutil>=2.1" ,
560- ]
561-
562538
563539class SampleData (OptionalPackage ):
564540 """
@@ -600,27 +576,18 @@ def get_package_data(self):
600576 }
601577
602578
603- class Numpy (SetupPackage ):
604- name = "numpy"
605-
606- def add_flags (self , ext ):
607- import numpy as np
608- ext .include_dirs .append (np .get_include ())
609- ext .define_macros .extend ([
610- # Ensure that PY_ARRAY_UNIQUE_SYMBOL is uniquely defined for each
611- # extension.
612- ('PY_ARRAY_UNIQUE_SYMBOL' ,
613- 'MPL_' + ext .name .replace ('.' , '_' ) + '_ARRAY_API' ),
614- ('NPY_NO_DEPRECATED_API' , 'NPY_1_7_API_VERSION' ),
615- # Allow NumPy's printf format specifiers in C++.
616- ('__STDC_FORMAT_MACROS' , 1 ),
617- ])
618-
619- def get_setup_requires (self ):
620- return ['numpy>=1.11' ]
621-
622- def get_install_requires (self ):
623- return ['numpy>=1.11' ]
579+ def add_numpy_flags (ext ):
580+ import numpy as np
581+ ext .include_dirs .append (np .get_include ())
582+ ext .define_macros .extend ([
583+ # Ensure that PY_ARRAY_UNIQUE_SYMBOL is uniquely defined for each
584+ # extension.
585+ ('PY_ARRAY_UNIQUE_SYMBOL' ,
586+ 'MPL_' + ext .name .replace ('.' , '_' ) + '_ARRAY_API' ),
587+ ('NPY_NO_DEPRECATED_API' , 'NPY_1_7_API_VERSION' ),
588+ # Allow NumPy's printf format specifiers in C++.
589+ ('__STDC_FORMAT_MACROS' , 1 ),
590+ ])
624591
625592
626593class LibAgg (SetupPackage ):
@@ -803,7 +770,7 @@ def get_extension(self):
803770 ]
804771 ext = Extension ('matplotlib.ft2font' , sources )
805772 FreeType ().add_flags (ext )
806- Numpy (). add_flags (ext )
773+ add_numpy_flags (ext )
807774 LibAgg ().add_flags (ext , add_sources = False )
808775 return ext
809776
@@ -831,7 +798,7 @@ def get_extension(self):
831798 atleast_version = '1.2' ,
832799 alt_exec = ['libpng-config' , '--ldflags' ],
833800 default_libraries = ['png' , 'z' ])
834- Numpy (). add_flags (ext )
801+ add_numpy_flags (ext )
835802 return ext
836803
837804
@@ -859,7 +826,7 @@ def get_extension(self):
859826 'extern/ttconv/ttutil.cpp'
860827 ]
861828 ext = Extension ('matplotlib.ttconv' , sources )
862- Numpy (). add_flags (ext )
829+ add_numpy_flags (ext )
863830 ext .include_dirs .insert (0 , 'extern' )
864831 return ext
865832
@@ -872,9 +839,8 @@ def get_extension(self):
872839 'src/py_converters.cpp' ,
873840 'src/_path_wrapper.cpp'
874841 ]
875-
876842 ext = Extension ('matplotlib._path' , sources )
877- Numpy (). add_flags (ext )
843+ add_numpy_flags (ext )
878844 LibAgg ().add_flags (ext )
879845 return ext
880846
@@ -890,7 +856,7 @@ def get_extension(self):
890856 'src/py_converters.cpp'
891857 ]
892858 ext = Extension ('matplotlib._image' , sources )
893- Numpy (). add_flags (ext )
859+ add_numpy_flags (ext )
894860 LibAgg ().add_flags (ext )
895861
896862 return ext
@@ -906,7 +872,7 @@ def get_extension(self):
906872 'src/py_converters.cpp' ,
907873 ]
908874 ext = Extension ('matplotlib._contour' , sources )
909- Numpy (). add_flags (ext )
875+ add_numpy_flags (ext )
910876 LibAgg ().add_flags (ext , add_sources = False )
911877 return ext
912878
@@ -918,7 +884,7 @@ def get_extension(self):
918884 sources = ['src/qhull_wrap.c' ]
919885 ext = Extension ('matplotlib._qhull' , sources ,
920886 define_macros = [('MPL_DEVNULL' , os .devnull )])
921- Numpy (). add_flags (ext )
887+ add_numpy_flags (ext )
922888 Qhull ().add_flags (ext )
923889 return ext
924890
@@ -933,7 +899,7 @@ def get_extension(self):
933899 "src/mplutils.cpp"
934900 ]
935901 ext = Extension ('matplotlib._tri' , sources )
936- Numpy (). add_flags (ext )
902+ add_numpy_flags (ext )
937903 return ext
938904
939905
@@ -949,7 +915,7 @@ def get_extension(self):
949915 "src/_backend_agg_wrapper.cpp"
950916 ]
951917 ext = Extension ('matplotlib.backends._backend_agg' , sources )
952- Numpy (). add_flags (ext )
918+ add_numpy_flags (ext )
953919 LibAgg ().add_flags (ext )
954920 FreeType ().add_flags (ext )
955921 return ext
@@ -970,7 +936,7 @@ def get_extension(self):
970936
971937 ext = Extension ('matplotlib.backends._tkagg' , sources )
972938 self .add_flags (ext )
973- Numpy (). add_flags (ext )
939+ add_numpy_flags (ext )
974940 LibAgg ().add_flags (ext , add_sources = False )
975941 return ext
976942
@@ -998,7 +964,6 @@ def get_extension(self):
998964 sources = [
999965 'src/_macosx.m'
1000966 ]
1001-
1002967 ext = Extension ('matplotlib.backends._macosx' , sources )
1003968 ext .extra_link_args .extend (['-framework' , 'Cocoa' ])
1004969 if platform .python_implementation ().lower () == 'pypy' :
0 commit comments