From 99c04e9b46024b7c346e26ea3bd14879182f0c3f Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sat, 6 Sep 2014 00:08:43 -0400 Subject: [PATCH 1/3] BLD/BUG/DOC : made pytz a required dependency closes #3423 --- INSTALL | 11 +++++------ setup.py | 1 + setupext.py | 17 +++++++++++++++++ 3 files changed, 23 insertions(+), 6 deletions(-) diff --git a/INSTALL b/INSTALL index dbd9716b3c22..1a854e5ae544 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 ^^^^^^^^^^^^^^^^^^^^^^ @@ -247,12 +252,6 @@ Optional dependencies 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. - 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..404c313498d1 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,22 @@ 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.") + + return "using pytz version %s" % pytz.__version__ + + def get_install_requires(self): + return ['pytz'] + + class Dateutil(SetupPackage): name = "dateutil" From f40bf1482be0c098b14119a4eed86c215237fc49 Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sat, 6 Sep 2014 00:10:06 -0400 Subject: [PATCH 2/3] DOC : removed freetype version caveats minimum version for freetype is 2.3 closes #3412 --- INSTALL | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/INSTALL b/INSTALL index 1a854e5ae544..5c3e26f7b520 100644 --- a/INSTALL +++ b/INSTALL @@ -245,12 +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. +:term:`freetype` 2.3 or later + library for reading true type font files. Required libraries that ship with matplotlib From ac6260672d1144a73f29f00a9151f52ed35adfdc Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sat, 6 Sep 2014 14:21:25 -0400 Subject: [PATCH 3/3] BLD : updated message when to pytz found --- setupext.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/setupext.py b/setupext.py index 404c313498d1..5c5ed82067fb 100755 --- a/setupext.py +++ b/setupext.py @@ -1192,7 +1192,9 @@ def check(self): import pytz except ImportError: return ( - "pytz was not found.") + "pytz was not found. " + "pip will attempt to install it " + "after matplotlib.") return "using pytz version %s" % pytz.__version__