@@ -1450,170 +1450,25 @@ def get_extension(self):
14501450 return ext
14511451
14521452
1453- class Six (SetupPackage ):
1454- name = "six"
1455- min_version = "1.10"
1453+ class InstallRequires (SetupPackage ):
1454+ name = "install_requires"
14561455
14571456 def check (self ):
1458- try :
1459- import six
1460- except ImportError :
1461- return (
1462- "six was not found."
1463- "pip will attempt to install it "
1464- "after matplotlib." )
1465-
1466- if not is_min_version (six .__version__ , self .min_version ):
1467- return ("The installed version of six is {inst_ver} but "
1468- "a the minimum required version is {min_ver}. "
1469- "pip/easy install will attempt to install a "
1470- "newer version."
1471- ).format (min_ver = self .min_version ,
1472- inst_ver = six .__version__ )
1473-
1474- return "using six version %s" % six .__version__
1475-
1476- def get_install_requires (self ):
1477- return ['six>={0}' .format (self .min_version )]
1478-
1479-
1480- class Pytz (SetupPackage ):
1481- name = "pytz"
1482-
1483- def check (self ):
1484- try :
1485- import pytz
1486- except ImportError :
1487- return (
1488- "pytz was not found. "
1489- "pip/easy_install may attempt to install it "
1490- "after matplotlib." )
1491-
1492- return "using pytz version %s" % pytz .__version__
1493-
1494- def get_install_requires (self ):
1495- return ['pytz' ]
1496-
1497-
1498- class Cycler (SetupPackage ):
1499- name = "cycler"
1500-
1501- def check (self ):
1502- try :
1503- import cycler
1504- except ImportError :
1505- return (
1506- "cycler was not found. "
1507- "pip/easy_install may attempt to install it "
1508- "after matplotlib." )
1509- return "using cycler version %s" % cycler .__version__
1510-
1511- def get_install_requires (self ):
1512- return ['cycler>=0.10' ]
1513-
1514-
1515- class Dateutil (SetupPackage ):
1516- name = "dateutil"
1517-
1518- def __init__ (self , version = '>=2.0' ):
1519- self .version = version
1520-
1521- def check (self ):
1522- try :
1523- import dateutil
1524- except ImportError :
1525- return (
1526- "dateutil was not found. It is required for date axis "
1527- "support. pip/easy_install may attempt to install it "
1528- "after matplotlib." )
1529-
1530- return "using dateutil version %s" % dateutil .__version__
1531-
1532- def get_install_requires (self ):
1533- dateutil = 'python-dateutil'
1534- if self .version is not None :
1535- dateutil += self .version
1536- return [dateutil ]
1537-
1538-
1539- class BackportsFuncToolsLRUCache (SetupPackage ):
1540- name = "backports.functools_lru_cache"
1541-
1542- def check (self ):
1543- if not PY3min :
1544- try :
1545- import backports .functools_lru_cache
1546- except ImportError :
1547- return (
1548- "backports.functools_lru_cache was not found. It is required for"
1549- "Python versions prior to 3.2" )
1550-
1551- return "using backports.functools_lru_cache"
1552- else :
1553- return "Not required"
1554-
1555- def get_install_requires (self ):
1556- if not PY3min :
1557- return ['backports.functools_lru_cache' ]
1558- else :
1559- return []
1560-
1561-
1562- class Subprocess32 (SetupPackage ):
1563- name = "subprocess32"
1564-
1565- def check (self ):
1566- if not PY3min :
1567- try :
1568- import subprocess32
1569- except ImportError :
1570- return (
1571- "subprocess32 was not found. It used "
1572- " for Python versions prior to 3.2 to improves"
1573- " functionality on Linux and OSX" )
1574-
1575- return "using subprocess32"
1576- else :
1577- return "Not required"
1578-
1579- def get_install_requires (self ):
1580- if not PY3min and os .name == 'posix' :
1581- return ['subprocess32' ]
1582- else :
1583- return []
1584-
1585-
1586- class Tornado (OptionalPackage ):
1587- name = "tornado"
1588-
1589- def check (self ):
1590- try :
1591- import tornado
1592- except ImportError :
1593- return (
1594- "tornado was not found. It is required for the WebAgg "
1595- "backend. pip/easy_install may attempt to install it "
1596- "after matplotlib." )
1597-
1598- return "using tornado version %s" % tornado .version
1599-
1600-
1601- class Pyparsing (SetupPackage ):
1602- name = "pyparsing"
1603-
1604- def check (self ):
1605- try :
1606- import pyparsing
1607- except ImportError :
1608- return (
1609- "pyparsing was not found. It is required for mathtext "
1610- "support. pip/easy_install may attempt to install it "
1611- "after matplotlib." )
1612-
1613- return "using pyparsing version %s" % pyparsing .__version__
1457+ return "handled by setuptools"
16141458
16151459 def get_install_requires (self ):
1616- return ['pyparsing>=2.0.1,!=2.0.4,!=2.1.2,!=2.1.6' ]
1460+ install_requires = [
1461+ "cycler>=0.10" ,
1462+ "pyparsing>=2.0.1,!=2.0.4,!=2.1.2,!=2.1.6" ,
1463+ "python-dateutil>=2.0" ,
1464+ "pytz" ,
1465+ "six>=1.10" ,
1466+ ]
1467+ if sys .version_info < (3 ,):
1468+ install_requires += ["backports.functools_lru_cache" ]
1469+ if sys .version_info < (3 ,) and os .name == "posix" :
1470+ install_requires += ["subprocess32" ]
1471+ return install_requires
16171472
16181473
16191474class BackendAgg (OptionalBackendPackage ):
0 commit comments