Skip to content

Commit 8d7b2f0

Browse files
authored
Swap to setuptools>=77.0 licence specification (#15128)
PEP 639[^1] introduced a new way of specifying the licence information of projects, both in the `pyproject.toml` metadata and in the resulting `METADATA` object of the package. Setuptools 77 (released in March 2025) both began accepting the new form and immediately deprecated the old form. We avoided moving to the new TOML keys in `pyproject.toml` immediately because we didn't want to rely on a too-recent version of the build toolchain, but given `setuptools`' development process, a six-month delay seems about the right trade-off between supporting older packages and not breaking on new releases. The `License ::` trove classifiers in the metadata were simultaneously deprecated as part of PEP 639, since the licence-expression form of the metadata now serves that purpose in a more general and well-supported manner. [^1]: https://peps.python.org/pep-0639/
1 parent 1d92701 commit 8d7b2f0

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed

pyproject.toml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,20 @@
11
[build-system]
2-
requires = ["setuptools", "wheel", "setuptools-rust"]
2+
# We duplicate the `requires` in `requirements-dev.txt` as a
3+
# convenience for developers.
4+
requires = [
5+
"setuptools>=77.0",
6+
"setuptools-rust",
7+
]
38
build-backend = "setuptools.build_meta"
49

510
[project]
611
name = "qiskit"
712
description = "An open-source SDK for working with quantum computers at the level of extended quantum circuits, operators, and primitives."
813
requires-python = ">=3.9"
9-
license = {text = "Apache 2.0"}
14+
license = "Apache-2.0"
15+
license-files = [
16+
"LICENSE.txt",
17+
]
1018
authors = [
1119
{ name = "Qiskit Development Team", email = "[email protected]" },
1220
]
@@ -22,7 +30,6 @@ classifiers = [
2230
"Environment :: Console",
2331
"Intended Audience :: Developers",
2432
"Intended Audience :: Science/Research",
25-
"License :: OSI Approved :: Apache Software License",
2633
"Operating System :: MacOS",
2734
"Operating System :: Microsoft :: Windows",
2835
"Operating System :: POSIX :: Linux",
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
other:
3+
- |
4+
When building or packaging Qiskit from source, the version of `setuptools` required is now at
5+
least version 77.0 (released in March 2025). This is to support the new license-metadata
6+
specifications of `PEP 639 <https://peps.python.org/pep-0639/>`__. This dependency is specified
7+
in the build requirements, and so no manual action should be needed.

requirements-dev.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66
# possible so it's easy to develop multiple packages from the same venv.
77

88
# Build Rust directly
9-
setuptools
9+
#
10+
# The normative version of these is in `pyproject.toml`, and are included here
11+
# as a convenience for setting up a build/dev environment without isolation.
12+
setuptools>=77.0
1013
setuptools-rust
1114

1215
# Style

0 commit comments

Comments
 (0)