Skip to content

Commit 353b3eb

Browse files
committed
update license-related keys in pyproject.toml
1 parent 438edfd commit 353b3eb

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

template/pyproject.toml.jinja

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# - https://www.python.org/dev/peps/pep-0621/
55

66
[build-system]
7-
requires = ["setuptools>=64.0.0", "setuptools-scm", "wheel"]
7+
requires = ["setuptools>=77.0.3", "setuptools-scm", "wheel"]
88
build-backend = "setuptools.build_meta"
99

1010
[project]
@@ -15,13 +15,6 @@ classifiers = [
1515
"Development Status :: 2 - Pre-Alpha",
1616
"Intended Audience :: Developers",
1717
"Intended Audience :: Science/Research",
18-
"{{ {'Apache Software License 2.0': 'License :: OSI Approved :: Apache Software License',
19-
'MIT license': 'License :: OSI Approved :: MIT License',
20-
'BSD license': 'License :: OSI Approved :: BSD License',
21-
'ISC license': 'License :: OSI Approved :: ISC License (ISCL)',
22-
'GNU General Public License v3 or later': 'License :: OSI Approved :: GNU General Public License',
23-
'Not open source': 'License :: Other/Proprietary License'
24-
}[license] }}",
2518
"Natural Language :: English",
2619
"Programming Language :: Python :: 3",
2720
"Programming Language :: Python :: 3.12",
@@ -35,7 +28,17 @@ keywords = [
3528
"{{ item }}"{{ "," if not loop.last }}
3629
{%- endfor -%}
3730
]
38-
license = {file = "LICENSE"}
31+
{% if license != "Other" -%}
32+
license = "{{ {'Apachev2': 'Apache-2.0',
33+
'MIT': 'MIT',
34+
'BSD': 'BSD-3-Clause',
35+
'ISC': 'ISC',
36+
'GNUv3': 'GPL-3.0-or-later',
37+
'GNULesserv3': 'LGPL-3.0-or-later',
38+
}[license] }}"
39+
{% endif -%}
40+
{#- NOTICE file is only present for Apache -#}
41+
license-files = ["LICENSE"{% if license == "Apachev2" %}, "NOTICE"{% endif %}]
3942
name = "{{ package_name }}"
4043
readme = {file = "README.md", content-type = "text/markdown"}
4144
requires-python = ">=3.12"

0 commit comments

Comments
 (0)