From accdb14d768d2670b929652687c6e9ed562d2c57 Mon Sep 17 00:00:00 2001 From: Juan Carlos Calvo Date: Wed, 11 Jan 2023 19:44:43 +0000 Subject: [PATCH 1/3] pep508 dependency specification --- setup.py | 31 +++++++++++++++++++++---------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/setup.py b/setup.py index b79a0d12a..8c1afddbc 100644 --- a/setup.py +++ b/setup.py @@ -35,10 +35,12 @@ #=============================================================================== from __future__ import print_function + +import codecs import os import sys -from setuptools import setup, Extension -import codecs + +from setuptools import Extension, setup try: ModuleNotFoundError @@ -117,13 +119,22 @@ def ismac(): except ModuleNotFoundError: ext_mods = [] -install_requirements = ['numpy>=1.7', 'six', 'paramz>=0.9.0', 'cython>=0.29'] -matplotlib_version = 'matplotlib==3.3.4' -if sys.version_info < (3, 6): - install_requirements += ['scipy>=1.3.0,<1.5.0'] - matplotlib_version = 'matplotlib==3.0.0' -else: - install_requirements += ['scipy>=1.3.0'] +install_requirements = [ + "numpy>=1.7", + "six", + "paramz>=0.9.0", + "cython>=0.29", + 'scipy>=1.3.0,<1.5.0;python_version<"3.6"', + 'scipy>=1.3.0;python_version>="3.6"', +] + +matplotlib_version = [ + 'matplotlib==3.0.0;python_version<"3.6"', + 'matplotlib==3.3.4;python_version>="3.6"', +] + +install_requirements += matplotlib_version + setup(name = 'GPy', version = __version__, @@ -177,7 +188,7 @@ def ismac(): 'ipython>=4.0.0', ], #matplotlib Version see github issue #955 - 'plotting':[matplotlib_version, + 'plotting':[*matplotlib_version, 'plotly >= 1.8.6'], 'notebook':['jupyter_client >= 4.0.6', 'ipywidgets >= 4.0.3', From 6a7f335a9b8de0320757d94038ab89c9d79c1a7c Mon Sep 17 00:00:00 2001 From: Juan Carlos Calvo Date: Wed, 11 Jan 2023 20:23:50 +0000 Subject: [PATCH 2/3] explicit matplotlib deps --- setup.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index 8c1afddbc..5c0ca8667 100644 --- a/setup.py +++ b/setup.py @@ -126,14 +126,10 @@ def ismac(): "cython>=0.29", 'scipy>=1.3.0,<1.5.0;python_version<"3.6"', 'scipy>=1.3.0;python_version>="3.6"', -] - -matplotlib_version = [ 'matplotlib==3.0.0;python_version<"3.6"', 'matplotlib==3.3.4;python_version>="3.6"', ] -install_requirements += matplotlib_version setup(name = 'GPy', @@ -188,7 +184,8 @@ def ismac(): 'ipython>=4.0.0', ], #matplotlib Version see github issue #955 - 'plotting':[*matplotlib_version, + 'plotting':['matplotlib==3.0.0;python_version<"3.6"', + 'matplotlib==3.3.4;python_version>="3.6"', 'plotly >= 1.8.6'], 'notebook':['jupyter_client >= 4.0.6', 'ipywidgets >= 4.0.3', From 950b7d5575678cf9e6c5ed7ace37af8bb4c89bf3 Mon Sep 17 00:00:00 2001 From: Juan Carlos Calvo Date: Wed, 11 Jan 2023 20:30:42 +0000 Subject: [PATCH 3/3] matplotlib optional --- setup.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/setup.py b/setup.py index 5c0ca8667..9e3f03e01 100644 --- a/setup.py +++ b/setup.py @@ -126,8 +126,6 @@ def ismac(): "cython>=0.29", 'scipy>=1.3.0,<1.5.0;python_version<"3.6"', 'scipy>=1.3.0;python_version>="3.6"', - 'matplotlib==3.0.0;python_version<"3.6"', - 'matplotlib==3.3.4;python_version>="3.6"', ]