From c2f912fe6200e02eb853d8a436f96fa1581bccb7 Mon Sep 17 00:00:00 2001 From: Robert Farmer Date: Wed, 10 Jul 2024 21:09:07 +0100 Subject: [PATCH] Remove distutils --- mesaPlot/file_reader.py | 2 -- mesaPlot/plot.py | 6 +++--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/mesaPlot/file_reader.py b/mesaPlot/file_reader.py index c10c813..1e28365 100644 --- a/mesaPlot/file_reader.py +++ b/mesaPlot/file_reader.py @@ -24,8 +24,6 @@ from io import BytesIO import pandas -from distutils.version import StrictVersion - msun = 1.9892 * 10 ** 33 # Conviently the index of this list is the proton number diff --git a/mesaPlot/plot.py b/mesaPlot/plot.py index 53a7adc..fcaa3f9 100644 --- a/mesaPlot/plot.py +++ b/mesaPlot/plot.py @@ -24,10 +24,10 @@ import matplotlib.patheffects as path_effects import os import random -from io import BytesIO + from cycler import cycler from scipy.interpolate import interp1d -from distutils.spawn import find_executable +from shutil import which import numpy.ma as ma import warnings @@ -1681,7 +1681,7 @@ def __init__(self, rcparams_fixed=True): if rcparams_fixed: # Set default matplotlib rcParameters (True by default) - if find_executable("latex"): + if which("latex"): mpl.rc("text", usetex=True) else: mpl.rc("text", usetex=False)