diff --git a/MANIFEST.in b/MANIFEST.in index 92f11d0dd7fe..4cda2f74bbf4 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -9,6 +9,7 @@ include lib/matplotlib/mpl-data/images/* include lib/matplotlib/mpl-data/fonts/ttf/* include lib/matplotlib/mpl-data/fonts/pdfcorefonts/* include lib/matplotlib/mpl-data/fonts/afm/* +include lib/matplotlib/mpl-data/stylelib/* recursive-include lib/matplotlib/mpl-data/sample_data * recursive-include LICENSE * recursive-include examples * diff --git a/lib/matplotlib/style/stylelib/bmh.mplstyle b/lib/matplotlib/mpl-data/stylelib/bmh.mplstyle similarity index 100% rename from lib/matplotlib/style/stylelib/bmh.mplstyle rename to lib/matplotlib/mpl-data/stylelib/bmh.mplstyle diff --git a/lib/matplotlib/style/stylelib/dark_background.mplstyle b/lib/matplotlib/mpl-data/stylelib/dark_background.mplstyle similarity index 100% rename from lib/matplotlib/style/stylelib/dark_background.mplstyle rename to lib/matplotlib/mpl-data/stylelib/dark_background.mplstyle diff --git a/lib/matplotlib/style/stylelib/fivethirtyeight.mplstyle b/lib/matplotlib/mpl-data/stylelib/fivethirtyeight.mplstyle similarity index 100% rename from lib/matplotlib/style/stylelib/fivethirtyeight.mplstyle rename to lib/matplotlib/mpl-data/stylelib/fivethirtyeight.mplstyle diff --git a/lib/matplotlib/style/stylelib/ggplot.mplstyle b/lib/matplotlib/mpl-data/stylelib/ggplot.mplstyle similarity index 100% rename from lib/matplotlib/style/stylelib/ggplot.mplstyle rename to lib/matplotlib/mpl-data/stylelib/ggplot.mplstyle diff --git a/lib/matplotlib/style/stylelib/grayscale.mplstyle b/lib/matplotlib/mpl-data/stylelib/grayscale.mplstyle similarity index 100% rename from lib/matplotlib/style/stylelib/grayscale.mplstyle rename to lib/matplotlib/mpl-data/stylelib/grayscale.mplstyle diff --git a/lib/matplotlib/style/core.py b/lib/matplotlib/style/core.py index 02efe1f8a691..8bd0d13b44ed 100644 --- a/lib/matplotlib/style/core.py +++ b/lib/matplotlib/style/core.py @@ -27,8 +27,7 @@ __all__ = ['use', 'context', 'available', 'library', 'reload_library'] -_here = os.path.abspath(os.path.dirname(__file__)) -BASE_LIBRARY_PATH = os.path.join(_here, 'stylelib') +BASE_LIBRARY_PATH = os.path.join(mpl.get_data_path(), 'stylelib') # Users may want multiple library paths, so store a list of paths. USER_LIBRARY_PATHS = [os.path.join(mpl._get_configdir(), 'stylelib')] STYLE_EXTENSION = 'mplstyle' diff --git a/setupext.py b/setupext.py index 48c4808e1923..210329d58ac3 100755 --- a/setupext.py +++ b/setupext.py @@ -585,7 +585,7 @@ def get_package_data(self): 'backends/web_backend/jquery/css/themes/base/images/*', 'backends/web_backend/css/*.*', 'backends/Matplotlib.nib/*', - 'style/stylelib/*.mplstyle', + 'mpl-data/stylelib/*.mplstyle', ]}