@@ -350,22 +350,6 @@ def get_extension(self):
350
350
"""
351
351
return None
352
352
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
-
369
353
def do_custom_build (self ):
370
354
"""
371
355
If a package needs to do extra custom things, such as building a
@@ -521,14 +505,6 @@ def get_package_data(self):
521
505
],
522
506
}
523
507
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
-
532
508
533
509
class SampleData (OptionalPackage ):
534
510
"""
@@ -568,27 +544,18 @@ def get_package_data(self):
568
544
}
569
545
570
546
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
+ ])
592
559
593
560
594
561
class LibAgg (SetupPackage ):
@@ -771,7 +738,7 @@ def get_extension(self):
771
738
]
772
739
ext = Extension ('matplotlib.ft2font' , sources )
773
740
FreeType ().add_flags (ext )
774
- Numpy (). add_flags (ext )
741
+ add_numpy_flags (ext )
775
742
LibAgg ().add_flags (ext , add_sources = False )
776
743
return ext
777
744
@@ -799,7 +766,7 @@ def get_extension(self):
799
766
atleast_version = '1.2' ,
800
767
alt_exec = ['libpng-config' , '--ldflags' ],
801
768
default_libraries = ['png' , 'z' ])
802
- Numpy (). add_flags (ext )
769
+ add_numpy_flags (ext )
803
770
return ext
804
771
805
772
@@ -827,7 +794,7 @@ def get_extension(self):
827
794
'extern/ttconv/ttutil.cpp'
828
795
]
829
796
ext = Extension ('matplotlib.ttconv' , sources )
830
- Numpy (). add_flags (ext )
797
+ add_numpy_flags (ext )
831
798
ext .include_dirs .insert (0 , 'extern' )
832
799
return ext
833
800
@@ -840,9 +807,8 @@ def get_extension(self):
840
807
'src/py_converters.cpp' ,
841
808
'src/_path_wrapper.cpp'
842
809
]
843
-
844
810
ext = Extension ('matplotlib._path' , sources )
845
- Numpy (). add_flags (ext )
811
+ add_numpy_flags (ext )
846
812
LibAgg ().add_flags (ext )
847
813
return ext
848
814
@@ -858,7 +824,7 @@ def get_extension(self):
858
824
'src/py_converters.cpp'
859
825
]
860
826
ext = Extension ('matplotlib._image' , sources )
861
- Numpy (). add_flags (ext )
827
+ add_numpy_flags (ext )
862
828
LibAgg ().add_flags (ext )
863
829
864
830
return ext
@@ -874,7 +840,7 @@ def get_extension(self):
874
840
'src/py_converters.cpp' ,
875
841
]
876
842
ext = Extension ('matplotlib._contour' , sources )
877
- Numpy (). add_flags (ext )
843
+ add_numpy_flags (ext )
878
844
LibAgg ().add_flags (ext , add_sources = False )
879
845
return ext
880
846
@@ -886,7 +852,7 @@ def get_extension(self):
886
852
sources = ['src/qhull_wrap.c' ]
887
853
ext = Extension ('matplotlib._qhull' , sources ,
888
854
define_macros = [('MPL_DEVNULL' , os .devnull )])
889
- Numpy (). add_flags (ext )
855
+ add_numpy_flags (ext )
890
856
Qhull ().add_flags (ext )
891
857
return ext
892
858
@@ -901,7 +867,7 @@ def get_extension(self):
901
867
"src/mplutils.cpp"
902
868
]
903
869
ext = Extension ('matplotlib._tri' , sources )
904
- Numpy (). add_flags (ext )
870
+ add_numpy_flags (ext )
905
871
return ext
906
872
907
873
@@ -917,7 +883,7 @@ def get_extension(self):
917
883
"src/_backend_agg_wrapper.cpp"
918
884
]
919
885
ext = Extension ('matplotlib.backends._backend_agg' , sources )
920
- Numpy (). add_flags (ext )
886
+ add_numpy_flags (ext )
921
887
LibAgg ().add_flags (ext )
922
888
FreeType ().add_flags (ext )
923
889
return ext
@@ -938,7 +904,7 @@ def get_extension(self):
938
904
939
905
ext = Extension ('matplotlib.backends._tkagg' , sources )
940
906
self .add_flags (ext )
941
- Numpy (). add_flags (ext )
907
+ add_numpy_flags (ext )
942
908
LibAgg ().add_flags (ext , add_sources = False )
943
909
return ext
944
910
@@ -965,7 +931,6 @@ def get_extension(self):
965
931
sources = [
966
932
'src/_macosx.m'
967
933
]
968
-
969
934
ext = Extension ('matplotlib.backends._macosx' , sources )
970
935
ext .extra_link_args .extend (['-framework' , 'Cocoa' ])
971
936
if platform .python_implementation ().lower () == 'pypy' :
0 commit comments