Skip to content

Commit 9c6d254

Browse files
committed
Migrate pyproject.toml to PEP 621-compliant [project] metadata format.
Squashed commit of the following: commit 3f939aa095fa6b5feb72fd0367140f1b95dff5ad Author: Martin Mahner <martin@mahner.org> Date: Tue Jul 22 12:38:31 2025 +0200 Update changelog commit 938e5e9ebcfbb262447fede565c995759da32b34 Author: Martin Mahner <martin@mahner.org> Date: Tue Jul 22 12:35:37 2025 +0200 Add additional project urls commit 0e2e576 Merge: 9932218 e19eddd Author: Martin Mahner <martin@mahner.org> Date: Tue Jul 22 12:24:52 2025 +0200 Merge remote-tracking branch 'origin/main' into project commit 9932218 Author: Miro Hrončok <miro@hroncok.cz> Date: Sun May 11 09:58:11 2025 +0200 Use standardized [project] table in pyproject.toml This allows us to swap the build backend more easily in RHEL, where we don't have poetry-code. This requires poetry-core >= 2 because older poetry did not support this. Also, replace the value of the license text with a SPDX identifier as documented in https://python-poetry.org/docs/pyproject/#license Otherwise, poetry-core injects a `Other/Proprietary License` classifier. (Note that poetry-core does not yet support PEP 639 fully). This change creates s slight change in the metadata, comments inline. --- old/qrcode-8.2-py3-none-any/qrcode-8.2.dist-info/METADATA +++ new/qrcode-8.2-py3-none-any/qrcode-8.2.dist-info/METADATA @@ -2,16 +2,15 @@ Name: qrcode Version: 8.2 Summary: QR Code image generator -License: BSD +License: BSD-3-Clause This was intentional. Keywords: qr,denso-wave,IEC18004 Author: Lincoln Loop Author-email: info@lincolnloop.com -Requires-Python: >=3.9,<4.0 +Requires-Python: ~=3.9 This is identical in reality. Classifier: Development Status :: 5 - Production/Stable -Classifier: Intended Audience :: Developers This only changes order :/ Classifier: License :: OSI Approved :: BSD License -Classifier: License :: Other/Proprietary License This is intentional. Classifier: Operating System :: OS Independent +Classifier: Intended Audience :: Developers See above, order only. Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.9 @@ -26,8 +25,10 @@ Provides-Extra: pil Provides-Extra: png Requires-Dist: colorama ; sys_platform == "win32" -Requires-Dist: pillow (>=9.1.0) ; extra == "pil" or extra == "all" -Requires-Dist: pypng ; extra == "png" or extra == "all" +Requires-Dist: pillow (>=9.1.0) ; extra == "all" +Requires-Dist: pillow (>=9.1.0) ; extra == "pil" +Requires-Dist: pypng ; extra == "all" +Requires-Dist: pypng ; extra == "png" This is identical. Project-URL: Homepage, https://github.com/lincolnloop/python-qrcode Description-Content-Type: text/x-rst
1 parent e19eddd commit 9c6d254

File tree

2 files changed

+37
-23
lines changed

2 files changed

+37
-23
lines changed

CHANGES.rst

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,15 @@ Change log
55
WIP
66
===
77

8-
- Allow execution as a Python module (@stefansjs in `#400`_)::
8+
- Migrate pyproject.toml to PEP 621-compliant [project] metadata format.
9+
(hroncok in `#399`_)
10+
- Allow execution as a Python module. (stefansjs in `#400`_)
11+
12+
::
913

1014
python -m qrcode --output qrcode.png "hello world"
1115

16+
.. _#399: https://github.com/lincolnloop/python-qrcode/pull/399
1217
.. _#400: https://github.com/lincolnloop/python-qrcode/pull/400
1318

1419
8.2 (01 May 2025)

pyproject.toml

Lines changed: 31 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
[build-system]
2-
requires = ["poetry-core"]
2+
requires = ["poetry-core>=2"]
33
build-backend = "poetry.core.masonry.api"
44

5-
[tool.poetry]
5+
[project]
66
name = "qrcode"
77
version = "8.2"
8-
packages = [{include = "qrcode"}]
98
description = "QR Code image generator"
10-
authors = ["Lincoln Loop <info@lincolnloop.com>"]
11-
license = "BSD"
12-
readme = ["README.rst", "CHANGES.rst"]
13-
homepage = "https://github.com/lincolnloop/python-qrcode"
9+
authors = [
10+
{ name = "Lincoln Loop", email = "info@lincolnloop.com" },
11+
]
12+
license = { text = "BSD-3-Clause" }
13+
dynamic = [ "readme" ]
1414
keywords = ["qr", "denso-wave", "IEC18004"]
1515
classifiers = [
1616
"Development Status :: 5 - Production/Stable",
@@ -28,6 +28,30 @@ classifiers = [
2828
"Topic :: Multimedia :: Graphics",
2929
"Topic :: Software Development :: Libraries :: Python Modules",
3030
]
31+
requires-python = "~=3.9"
32+
dependencies = [
33+
"colorama; sys_platform == 'win32'",
34+
]
35+
36+
37+
[project.optional-dependencies]
38+
pil = ["pillow >=9.1.0"]
39+
png = ["pypng"]
40+
all = ["pypng", "pillow >=9.1.0"]
41+
42+
[project.urls]
43+
homepage = "https://github.com/lincolnloop/python-qrcode"
44+
repository = "https://github.com/lincolnloop/python-qrcode.git"
45+
documentation = "https://github.com/lincolnloop/python-qrcode#readme"
46+
changelog = "https://github.com/lincolnloop/python-qrcode/blob/main/CHANGES.rst"
47+
"Bug Tracker" = "https://github.com/lincolnloop/python-qrcode/issues"
48+
49+
[project.scripts]
50+
qr = "qrcode.console_scripts:main"
51+
52+
[tool.poetry]
53+
packages = [{include = "qrcode"}]
54+
readme = ["README.rst", "CHANGES.rst"]
3155

3256
# There is no support for data files yet.
3357
# https://github.com/python-poetry/poetry/issues/9519
@@ -36,21 +60,6 @@ classifiers = [
3660
# { destination = "share/man/man1", from = [ "doc/qr.1" ] },
3761
# ]
3862

39-
[tool.poetry.scripts]
40-
qr = 'qrcode.console_scripts:main'
41-
42-
43-
[tool.poetry.dependencies]
44-
python = "^3.9"
45-
colorama = {version = "*", platform = "win32"}
46-
pypng = {version = "*", optional = true}
47-
pillow = {version = ">=9.1.0", optional = true}
48-
49-
[tool.poetry.extras]
50-
pil = ["pillow"]
51-
png = ["pypng"]
52-
all = ["pypng","pillow"]
53-
5463
[tool.poetry.group.dev.dependencies]
5564
pytest = {version = "*"}
5665
pytest-cov = {version = "*"}

0 commit comments

Comments
 (0)