@@ -353,22 +353,6 @@ def get_extension(self):
353
353
"""
354
354
return None
355
355
356
- def get_install_requires (self ):
357
- """
358
- Get a list of Python packages that we require.
359
- pip/easy_install will attempt to download and install this
360
- package if it is not installed.
361
- """
362
- return []
363
-
364
- def get_setup_requires (self ):
365
- """
366
- Get a list of Python packages that we require at build time.
367
- pip/easy_install will attempt to download and install this
368
- package if it is not installed.
369
- """
370
- return []
371
-
372
356
def do_custom_build (self ):
373
357
"""
374
358
If a package needs to do extra custom things, such as building a
@@ -544,14 +528,6 @@ def get_package_data(self):
544
528
],
545
529
}
546
530
547
- def get_install_requires (self ):
548
- return [
549
- "cycler>=0.10" ,
550
- "kiwisolver>=1.0.1" ,
551
- "pyparsing>=2.0.1,!=2.0.4,!=2.1.2,!=2.1.6" ,
552
- "python-dateutil>=2.1" ,
553
- ]
554
-
555
531
556
532
class SampleData (OptionalPackage ):
557
533
"""
@@ -591,27 +567,18 @@ def get_package_data(self):
591
567
}
592
568
593
569
594
- class Numpy (SetupPackage ):
595
- name = "numpy"
596
-
597
- def add_flags (self , ext ):
598
- import numpy as np
599
- ext .include_dirs .append (np .get_include ())
600
- ext .define_macros .extend ([
601
- # Ensure that PY_ARRAY_UNIQUE_SYMBOL is uniquely defined for each
602
- # extension.
603
- ('PY_ARRAY_UNIQUE_SYMBOL' ,
604
- 'MPL_' + ext .name .replace ('.' , '_' ) + '_ARRAY_API' ),
605
- ('NPY_NO_DEPRECATED_API' , 'NPY_1_7_API_VERSION' ),
606
- # Allow NumPy's printf format specifiers in C++.
607
- ('__STDC_FORMAT_MACROS' , 1 ),
608
- ])
609
-
610
- def get_setup_requires (self ):
611
- return ['numpy>=1.11' ]
612
-
613
- def get_install_requires (self ):
614
- return ['numpy>=1.11' ]
570
+ def add_numpy_flags (ext ):
571
+ import numpy as np
572
+ ext .include_dirs .append (np .get_include ())
573
+ ext .define_macros .extend ([
574
+ # Ensure that PY_ARRAY_UNIQUE_SYMBOL is uniquely defined for each
575
+ # extension.
576
+ ('PY_ARRAY_UNIQUE_SYMBOL' ,
577
+ 'MPL_' + ext .name .replace ('.' , '_' ) + '_ARRAY_API' ),
578
+ ('NPY_NO_DEPRECATED_API' , 'NPY_1_7_API_VERSION' ),
579
+ # Allow NumPy's printf format specifiers in C++.
580
+ ('__STDC_FORMAT_MACROS' , 1 ),
581
+ ])
615
582
616
583
617
584
class LibAgg (SetupPackage ):
@@ -794,7 +761,7 @@ def get_extension(self):
794
761
]
795
762
ext = Extension ('matplotlib.ft2font' , sources )
796
763
FreeType ().add_flags (ext )
797
- Numpy (). add_flags (ext )
764
+ add_numpy_flags (ext )
798
765
LibAgg ().add_flags (ext , add_sources = False )
799
766
return ext
800
767
@@ -822,7 +789,7 @@ def get_extension(self):
822
789
atleast_version = '1.2' ,
823
790
alt_exec = ['libpng-config' , '--ldflags' ],
824
791
default_libraries = ['png' , 'z' ])
825
- Numpy (). add_flags (ext )
792
+ add_numpy_flags (ext )
826
793
return ext
827
794
828
795
@@ -850,7 +817,7 @@ def get_extension(self):
850
817
'extern/ttconv/ttutil.cpp'
851
818
]
852
819
ext = Extension ('matplotlib.ttconv' , sources )
853
- Numpy (). add_flags (ext )
820
+ add_numpy_flags (ext )
854
821
ext .include_dirs .insert (0 , 'extern' )
855
822
return ext
856
823
@@ -863,9 +830,8 @@ def get_extension(self):
863
830
'src/py_converters.cpp' ,
864
831
'src/_path_wrapper.cpp'
865
832
]
866
-
867
833
ext = Extension ('matplotlib._path' , sources )
868
- Numpy (). add_flags (ext )
834
+ add_numpy_flags (ext )
869
835
LibAgg ().add_flags (ext )
870
836
return ext
871
837
@@ -881,7 +847,7 @@ def get_extension(self):
881
847
'src/py_converters.cpp'
882
848
]
883
849
ext = Extension ('matplotlib._image' , sources )
884
- Numpy (). add_flags (ext )
850
+ add_numpy_flags (ext )
885
851
LibAgg ().add_flags (ext )
886
852
887
853
return ext
@@ -897,7 +863,7 @@ def get_extension(self):
897
863
'src/py_converters.cpp' ,
898
864
]
899
865
ext = Extension ('matplotlib._contour' , sources )
900
- Numpy (). add_flags (ext )
866
+ add_numpy_flags (ext )
901
867
LibAgg ().add_flags (ext , add_sources = False )
902
868
return ext
903
869
@@ -909,7 +875,7 @@ def get_extension(self):
909
875
sources = ['src/qhull_wrap.c' ]
910
876
ext = Extension ('matplotlib._qhull' , sources ,
911
877
define_macros = [('MPL_DEVNULL' , os .devnull )])
912
- Numpy (). add_flags (ext )
878
+ add_numpy_flags (ext )
913
879
Qhull ().add_flags (ext )
914
880
return ext
915
881
@@ -924,7 +890,7 @@ def get_extension(self):
924
890
"src/mplutils.cpp"
925
891
]
926
892
ext = Extension ('matplotlib._tri' , sources )
927
- Numpy (). add_flags (ext )
893
+ add_numpy_flags (ext )
928
894
return ext
929
895
930
896
@@ -940,7 +906,7 @@ def get_extension(self):
940
906
"src/_backend_agg_wrapper.cpp"
941
907
]
942
908
ext = Extension ('matplotlib.backends._backend_agg' , sources )
943
- Numpy (). add_flags (ext )
909
+ add_numpy_flags (ext )
944
910
LibAgg ().add_flags (ext )
945
911
FreeType ().add_flags (ext )
946
912
return ext
@@ -961,7 +927,7 @@ def get_extension(self):
961
927
962
928
ext = Extension ('matplotlib.backends._tkagg' , sources )
963
929
self .add_flags (ext )
964
- Numpy (). add_flags (ext )
930
+ add_numpy_flags (ext )
965
931
LibAgg ().add_flags (ext , add_sources = False )
966
932
return ext
967
933
@@ -989,7 +955,6 @@ def get_extension(self):
989
955
sources = [
990
956
'src/_macosx.m'
991
957
]
992
-
993
958
ext = Extension ('matplotlib.backends._macosx' , sources )
994
959
ext .extra_link_args .extend (['-framework' , 'Cocoa' ])
995
960
if platform .python_implementation ().lower () == 'pypy' :
0 commit comments