@@ -360,22 +360,6 @@ def get_extension(self):
360
360
"""
361
361
return None
362
362
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
-
379
363
def do_custom_build (self ):
380
364
"""
381
365
If a package needs to do extra custom things, such as building a
@@ -551,14 +535,6 @@ def get_package_data(self):
551
535
],
552
536
}
553
537
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
-
562
538
563
539
class SampleData (OptionalPackage ):
564
540
"""
@@ -600,27 +576,18 @@ def get_package_data(self):
600
576
}
601
577
602
578
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
+ ])
624
591
625
592
626
593
class LibAgg (SetupPackage ):
@@ -803,7 +770,7 @@ def get_extension(self):
803
770
]
804
771
ext = Extension ('matplotlib.ft2font' , sources )
805
772
FreeType ().add_flags (ext )
806
- Numpy (). add_flags (ext )
773
+ add_numpy_flags (ext )
807
774
LibAgg ().add_flags (ext , add_sources = False )
808
775
return ext
809
776
@@ -831,7 +798,7 @@ def get_extension(self):
831
798
atleast_version = '1.2' ,
832
799
alt_exec = ['libpng-config' , '--ldflags' ],
833
800
default_libraries = ['png' , 'z' ])
834
- Numpy (). add_flags (ext )
801
+ add_numpy_flags (ext )
835
802
return ext
836
803
837
804
@@ -859,7 +826,7 @@ def get_extension(self):
859
826
'extern/ttconv/ttutil.cpp'
860
827
]
861
828
ext = Extension ('matplotlib.ttconv' , sources )
862
- Numpy (). add_flags (ext )
829
+ add_numpy_flags (ext )
863
830
ext .include_dirs .insert (0 , 'extern' )
864
831
return ext
865
832
@@ -872,9 +839,8 @@ def get_extension(self):
872
839
'src/py_converters.cpp' ,
873
840
'src/_path_wrapper.cpp'
874
841
]
875
-
876
842
ext = Extension ('matplotlib._path' , sources )
877
- Numpy (). add_flags (ext )
843
+ add_numpy_flags (ext )
878
844
LibAgg ().add_flags (ext )
879
845
return ext
880
846
@@ -890,7 +856,7 @@ def get_extension(self):
890
856
'src/py_converters.cpp'
891
857
]
892
858
ext = Extension ('matplotlib._image' , sources )
893
- Numpy (). add_flags (ext )
859
+ add_numpy_flags (ext )
894
860
LibAgg ().add_flags (ext )
895
861
896
862
return ext
@@ -906,7 +872,7 @@ def get_extension(self):
906
872
'src/py_converters.cpp' ,
907
873
]
908
874
ext = Extension ('matplotlib._contour' , sources )
909
- Numpy (). add_flags (ext )
875
+ add_numpy_flags (ext )
910
876
LibAgg ().add_flags (ext , add_sources = False )
911
877
return ext
912
878
@@ -918,7 +884,7 @@ def get_extension(self):
918
884
sources = ['src/qhull_wrap.c' ]
919
885
ext = Extension ('matplotlib._qhull' , sources ,
920
886
define_macros = [('MPL_DEVNULL' , os .devnull )])
921
- Numpy (). add_flags (ext )
887
+ add_numpy_flags (ext )
922
888
Qhull ().add_flags (ext )
923
889
return ext
924
890
@@ -933,7 +899,7 @@ def get_extension(self):
933
899
"src/mplutils.cpp"
934
900
]
935
901
ext = Extension ('matplotlib._tri' , sources )
936
- Numpy (). add_flags (ext )
902
+ add_numpy_flags (ext )
937
903
return ext
938
904
939
905
@@ -949,7 +915,7 @@ def get_extension(self):
949
915
"src/_backend_agg_wrapper.cpp"
950
916
]
951
917
ext = Extension ('matplotlib.backends._backend_agg' , sources )
952
- Numpy (). add_flags (ext )
918
+ add_numpy_flags (ext )
953
919
LibAgg ().add_flags (ext )
954
920
FreeType ().add_flags (ext )
955
921
return ext
@@ -970,7 +936,7 @@ def get_extension(self):
970
936
971
937
ext = Extension ('matplotlib.backends._tkagg' , sources )
972
938
self .add_flags (ext )
973
- Numpy (). add_flags (ext )
939
+ add_numpy_flags (ext )
974
940
LibAgg ().add_flags (ext , add_sources = False )
975
941
return ext
976
942
@@ -998,7 +964,6 @@ def get_extension(self):
998
964
sources = [
999
965
'src/_macosx.m'
1000
966
]
1001
-
1002
967
ext = Extension ('matplotlib.backends._macosx' , sources )
1003
968
ext .extra_link_args .extend (['-framework' , 'Cocoa' ])
1004
969
if platform .python_implementation ().lower () == 'pypy' :
0 commit comments