diff --git a/setup.cfg b/.flake8 similarity index 100% rename from setup.cfg rename to .flake8 diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 801545b..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,13 +0,0 @@ -recursive-include mpl_sphinx_theme *.py -recursive-include mpl_sphinx_theme *.html -recursive-include mpl_sphinx_theme *.css -recursive-include mpl_sphinx_theme *.svg -recursive-include mpl_sphinx_theme *.png -recursive-include mpl_sphinx_theme *.ico -recursive-include mpl_sphinx_theme *.conf - -include setup.py -include requirements.txt -include README.rst -include LICENSE.txt -include MANIFEST.in diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..8db7985 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,51 @@ +[build-system] +requires = ["setuptools>=61.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "mpl_sphinx_theme" +dynamic = ["version"] +description = "Matplotlib theme for Sphinx" +readme = "README.rst" +requires-python = ">=3" +license = {file = "LICENSE.txt"} +authors = [ + {name = "Matplotlib Developers"}, +] +classifiers = [ + "Framework :: Sphinx :: Theme", + "Programming Language :: Python :: 3 :: Only", + "Topic :: Documentation", + "Topic :: Documentation :: Sphinx", +] +dependencies = [ + "pydata-sphinx-theme>=0.13.1", + "matplotlib", +] + +[project.urls] +homepage = "https://matplotlib.org/mpl-sphinx-theme/" +repository = "https://github.com/matplotlib/mpl-sphinx-theme" + +# http://www.sphinx-doc.org/en/stable/theming.html#distribute-your-theme-as-a-python-package +[project.entry-points."sphinx.html_themes"] +mpl_sphinx_theme = "mpl_sphinx_theme" + +[tool.setuptools] +packages = ["mpl_sphinx_theme"] +zip-safe = false + +[tool.setuptools.dynamic] +version = {attr = "mpl_sphinx_theme.__version__"} + +[tool.setuptools.package-data] +mpl_sphinx_theme = [ + "theme.conf", + "*.html", + "static/css/*.css", + "static/images/*.svg", + "static/images/*.ico", + "static/js/*.js", + "static/font/*.*", + "components/*.html", +] diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index a945df9..0000000 --- a/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -pydata-sphinx-theme>=0.13.1 -matplotlib \ No newline at end of file diff --git a/setup.py b/setup.py deleted file mode 100644 index 7a2847a..0000000 --- a/setup.py +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env python - -from setuptools import setup -import mpl_sphinx_theme - -setup( - name="mpl_sphinx_theme", - version=mpl_sphinx_theme.__version__, - url="https://github.com/matplotlib/mpl-sphinx-theme", - license="BSD", - author="Matplotlib Developers", - description="Matplotlib theme for Sphinx", - long_description=open("README.rst").read(), - zip_safe=False, - packages=["mpl_sphinx_theme"], - package_data={ - "mpl_sphinx_theme": [ - "theme.conf", - "*.html", - "static/css/*.css", - "static/images/*.svg", - "static/images/*.ico", - "static/js/*.js", - "static/font/*.*", - "components/*.html", - ] - }, - include_package_data=True, - # http://www.sphinx-doc.org/en/stable/theming.html#distribute-your-theme-as-a-python-package - entry_points={ - "sphinx.html_themes": [ - "mpl_sphinx_theme = mpl_sphinx_theme", - ] - }, - install_requires=open("requirements.txt").read().strip().split("\n"), -)