Skip to content

Commit

Permalink
Bump to v1.1.0
Browse files Browse the repository at this point in the history
Clean up setup.py
Update README.md
Update CHANGES.md
  • Loading branch information
echedey-ls committed Nov 7, 2022
1 parent f49a826 commit 6545c72
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 40 deletions.
7 changes: 7 additions & 0 deletions 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)
====================

Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -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)).
Expand Down
40 changes: 1 addition & 39 deletions setup.py
Expand Up @@ -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__))
Expand All @@ -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",
Expand Down Expand Up @@ -80,5 +43,4 @@
"matplotlib-styles",
"python"
],
# cmdclass={'install': PostInstallMoveFile, },
)

0 comments on commit 6545c72

Please sign in to comment.