diff --git a/CHANGES.md b/CHANGES.md index bbdae68..af8fd41 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,10 @@ +v1.1.0 (07-Nov-2022) +==================== +- Major change in distribution system + - Now needs import directive `import scienceplots` +- Fix not using raw string in `plot-example.py` +- Update README + v1.0.9 (16-Sep-2021) ==================== diff --git a/README.md b/README.md index be6486b..5a474a2 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ cd SciencePlots pip install -e . ``` -The pip installation will automatically move all of the Matplotlib style files `*.mplstyle` into the appropriate directory on your computer. +From version `v1.1.0` on, `import scienceplots` is needed on top of your scripts so Matplotlib can make use of the styles. **Notes:** - SciencePlots requires Latex ([see Latex installation instructions](https://github.com/garrettj403/SciencePlots/wiki/FAQ#installing-latex)). diff --git a/setup.py b/setup.py index b3b3cdf..bef9a04 100644 --- a/setup.py +++ b/setup.py @@ -5,45 +5,8 @@ must be called before plt.style.use(...). """ -# Commented out code is due to how installation was made. -# That code is based on a StackOverflow answer: -# https://stackoverflow.com/questions/31559225/how-to-ship-or-distribute-a-matplotlib-stylesheet -# It will remain here until a decision is made on if we should uninstall old versions or just ignore the issue. - -# import atexit -# import glob import os -# import shutil - -# import matplotlib from setuptools import setup -# from setuptools.command.install import install - - -# def install_styles(): -# # Find all style files -# stylefiles = glob.glob('styles/**/*.mplstyle', recursive=True) -# # Find stylelib directory (where the *.mplstyle files go) -# mpl_stylelib_dir = os.path.join(matplotlib.get_configdir(), "stylelib") -# if not os.path.exists(mpl_stylelib_dir): -# os.makedirs(mpl_stylelib_dir) -# # Copy files over -# print("Installing styles into", mpl_stylelib_dir) -# for stylefile in stylefiles: -# print(os.path.basename(stylefile)) -# shutil.copy( -# stylefile, -# os.path.join(mpl_stylelib_dir, os.path.basename(stylefile))) - - -# ('notebook.mplstyle', 'scatter.mplstyle', 'science.mplstyle', 'bright.mplstyle', 'high-contrast.mplstyle', 'high-vis.mplstyle', 'light.mplstyle', 'muted.mplstyle', 'retro.mplstyle', 'std-colors.mplstyle', 'vibrant.mplstyle', 'ieee.mplstyle', 'nature.mplstyle', 'cjk-jp-font.mplstyle', 'cjk-kr-font.mplstyle', 'cjk-sc-font.mplstyle', 'cjk-tc-font.mplstyle', 'grid.mplstyle', 'latex-sans.mplstyle', 'no-latex.mplstyle', 'pgf.mplstyle', 'russian-font.mplstyle', 'sans.mplstyle') - - -# class PostInstallMoveFile(install): -# def __init__(self, *args, **kwargs): -# super().__init__(*args, **kwargs) -# atexit.register(install_styles) - # Get description from README root = os.path.abspath(os.path.dirname(__file__)) @@ -52,7 +15,7 @@ setup( name='SciencePlots', - version='1.0.9', + version='1.1.0', author="John Garrett", author_email="garrettj403@gmail.com", description="Format Matplotlib for scientific plotting", @@ -80,5 +43,4 @@ "matplotlib-styles", "python" ], - # cmdclass={'install': PostInstallMoveFile, }, )