diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index eceb3285..0e94f051 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -159,7 +159,7 @@ When adding changes, document the rationale unless the code is already self-docu You can change [Furo's CSS variable values](https://github.com/pradyunsg/furo/tree/main/src/furo/assets/styles/variables) by setting them in the `body` rule at the top. When introducing our own CSS variables, prefix it with `--qiskit` for clarity, e.g. `--qiskit-top-nav-bar-height`. ### How to update the Furo version -Update the version in `setup.py`. Always pin to an exact version of Furo. +Update the version in `pyproject.toml`. Always pin to an exact version of Furo. However, when updating, closely analyze each commit in the release to check for any changes that would break our fork. We want to make sure that our HTML files are always in sync with Furo. If they have made any changes, then add them back to our copy of the file. @@ -187,7 +187,7 @@ The release process changes whether you are releasing the very first `rc1` for t 1. `git checkout main` 2. `git pull upstream main` 3. `git checkout -b release-`, e.g. `release-1.11.0rc1` - 4. Bump `setup.py` and `src/qiskit_sphinx_theme/__init__.py` to use the new version, e.g. https://github.com/Qiskit/qiskit_sphinx_theme/pull/207 + 4. Bump `src/qiskit_sphinx_theme/__init__.py` to use the new version, e.g. https://github.com/Qiskit/qiskit_sphinx_theme/pull/207 5. PR the change and land it 2. Push the Git tag: 1. `git checkout main` @@ -221,7 +221,7 @@ Use this process for: 1. `git checkout `, e.g. `1.11`. 2. `git pull upstream `, e.g. `1.11`. 3. `git checkout -b release-`, e.g. `release-1.11.0rc3` - 4. Bump `setup.py` and `src/qiskit_sphinx_theme/__init__.py` to use the new version, e.g. https://github.com/Qiskit/qiskit_sphinx_theme/pull/207 + 4. Bump `src/qiskit_sphinx_theme/__init__.py` to use the new version, e.g. https://github.com/Qiskit/qiskit_sphinx_theme/pull/207 5. PR the change and land it. Change the PR's merge base in the top to the release branch; it defaults to `main`. 3. Push the Git tag: 1. `git checkout `, e.g. `1.11`. diff --git a/pyproject.toml b/pyproject.toml index 1248cb37..11efb4f7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,11 +2,48 @@ requires = ["setuptools"] build-backend = "setuptools.build_meta" -[tool.pytest.ini_options] -addopts = [ - "--import-mode=importlib", +[project] +name = "qiskit-sphinx-theme" +description = "A Sphinx theme for Qiskit and Qiskit Ecosystem projects" +dynamic = ["version"] + +license = { text = "Apache 2" } +authors = [{ name = "Qiskit Development Team", email = "hello@qiskit.org" }] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Environment :: Web Environment", + "Intended Audience :: Developers", + "Intended Audience :: System Administrators", + "License :: OSI Approved :: Apache Software License", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Topic :: Internet", + "Topic :: Software Development :: Documentation", + "Framework :: Sphinx :: Theme", ] +dependencies = [ + "docutils", + # Keep in sync with Furo's constraint. + "sphinx>=6.0", + # Remove jQuery once we get rid of the Pytorch theme. + "sphinxcontrib-jquery", + # See CONTRIBUTING.md for how to upgrade Furo. + "furo==2023.5.20", +] + +[project.entry-points."sphinx.html_themes"] +qiskit_sphinx_theme = "qiskit_sphinx_theme" +_qiskit_furo = "qiskit_sphinx_theme" + +[project.urls] +"Bug Tracker" = "https://github.com/Qiskit/qiskit_sphinx_theme/issues" +"Source Code" = "https://github.com/Qiskit/qiskit_sphinx_theme" + + +[tool.pytest.ini_options] +addopts = ["--import-mode=importlib"] + [tool.black] line-length = 100 target-version = ["py37", "py38", "py39", "py310", "py311"] diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 2a9acf13..00000000 --- a/setup.cfg +++ /dev/null @@ -1,2 +0,0 @@ -[bdist_wheel] -universal = 1 diff --git a/setup.py b/setup.py deleted file mode 100644 index a7ece3d4..00000000 --- a/setup.py +++ /dev/null @@ -1,43 +0,0 @@ -from setuptools import setup - -setup( - name="qiskit_sphinx_theme", - version="1.12.0rc1", - author="Qiskit Development Team", - author_email="hello@qiskit.org", - url="https://github.com/Qiskit/qiskit_sphinx_theme", - description="A Sphinx theme for Qiskit that is based on the Pytorch Sphinx theme.", - include_package_data=True, - entry_points={ - "sphinx.html_themes": [ - "qiskit_sphinx_theme = qiskit_sphinx_theme", - "_qiskit_furo = qiskit_sphinx_theme", - ], - }, - license="Apache 2", - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Environment :: Web Environment", - "Intended Audience :: Developers", - "Intended Audience :: System Administrators", - "License :: OSI Approved :: Apache Software License", - "Operating System :: OS Independent", - "Programming Language :: Python", - "Topic :: Internet", - "Topic :: Software Development :: Documentation", - "Framework :: Sphinx :: Theme", - ], - install_requires=[ - "docutils", - # Keep in sync with Furo's constraint. - "sphinx>=6.0", - # Remove jQuery once we get rid of the Pytorch theme. - "sphinxcontrib-jquery", - # See CONTRIBUTING.md for how to upgrade Furo. - "furo==2023.5.20", - ], - project_urls={ - "Bug Tracker": "https://github.com/Qiskit/qiskit_sphinx_theme/issues", - "Source Code": "https://github.com/Qiskit/qiskit_sphinx_theme", - }, -)