diff --git a/INSTALL b/INSTALL index dbd9716b3c22..5c3e26f7b520 100644 --- a/INSTALL +++ b/INSTALL @@ -201,6 +201,11 @@ libpng 1.2 (or later) `__). libpng requires zlib. +`pytz` + Used to manipulate time-zone aware datetimes. + + + Optional GUI framework ^^^^^^^^^^^^^^^^^^^^^^ @@ -240,18 +245,8 @@ Optional dependencies selection of image file formats. -:term:`freetype` 2.4 or later - library for reading true type font files. Matplotlib in known - to work with freetype 2.3, and the required version will be reduced - in 1.4.1. If you need to build from source on a system which only has - freetype 2.3 available, please edit L945 of `setupext.py` to reduce - `min_version` to 2.3. - -`pytz` - Required if you want to manipulate datetime objects which are time-zone - aware. An exception will be raised if you try to make time-zone aware - plots with out `pytz` installed. It will become a required dependency - in 1.4.1. +:term:`freetype` 2.3 or later + library for reading true type font files. Required libraries that ship with matplotlib diff --git a/setup.py b/setup.py index 64e3d7e38c40..aeeb5816f38b 100644 --- a/setup.py +++ b/setup.py @@ -66,6 +66,7 @@ setupext.Numpy(), setupext.Six(), setupext.Dateutil(), + setupext.Pytz(), setupext.Tornado(), setupext.Pyparsing(), setupext.CXX(), diff --git a/setupext.py b/setupext.py index 31f9b06d5c27..5c5ed82067fb 100755 --- a/setupext.py +++ b/setupext.py @@ -984,6 +984,7 @@ def get_extension(self): self.add_flags(ext) return ext + class FT2Font(SetupPackage): name = 'ft2font' @@ -1183,6 +1184,24 @@ def get_install_requires(self): return ['six>={0}'.format(self.min_version)] +class Pytz(SetupPackage): + name = "pytz" + + def check(self): + try: + import pytz + except ImportError: + return ( + "pytz was not found. " + "pip will attempt to install it " + "after matplotlib.") + + return "using pytz version %s" % pytz.__version__ + + def get_install_requires(self): + return ['pytz'] + + class Dateutil(SetupPackage): name = "dateutil"