Skip to content

Commit

Permalink
Migrate from setup.py to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric-Arellano committed Jun 27, 2023
1 parent 5e359ed commit db0c068
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 51 deletions.
6 changes: 3 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down Expand Up @@ -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-<version-number>`, 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`
Expand Down Expand Up @@ -221,7 +221,7 @@ Use this process for:
1. `git checkout <release-branch>`, e.g. `1.11`.
2. `git pull upstream <release-branch>`, e.g. `1.11`.
3. `git checkout -b release-<full-version>`, 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 <release-branch>`, e.g. `1.11`.
Expand Down
43 changes: 40 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
2 changes: 0 additions & 2 deletions setup.cfg

This file was deleted.

43 changes: 0 additions & 43 deletions setup.py

This file was deleted.

0 comments on commit db0c068

Please sign in to comment.