Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

### Changed

* Following [PEP 639](https://peps.python.org/pep-0639/#specification), updated `license` and `license-files` keys in `pyproject.toml` [#707](https://github.com/NLeSC/python-template/pull/707)
* Recommend `ruff format` instead of `yapf` for fixing code style readability [#695](https://github.com/NLeSC/python-template/pull/695)

### Removed
Expand Down
6 changes: 5 additions & 1 deletion template/MANIFEST.in.jinja
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
{% if AddCitation -%}include CITATION.cff{%- endif %}
{%- if AddCitation %}
include CITATION.cff
{%- endif %}
include LICENSE
{%- if license == "Apachev2" %}
include NOTICE
{%- endif %}
include README.md
21 changes: 12 additions & 9 deletions template/pyproject.toml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# - https://www.python.org/dev/peps/pep-0621/

[build-system]
requires = ["setuptools>=64.0.0", "setuptools-scm", "wheel"]
requires = ["setuptools>=77.0.3", "setuptools-scm", "wheel"]
build-backend = "setuptools.build_meta"

[project]
Expand All @@ -15,13 +15,6 @@ classifiers = [
"Development Status :: 2 - Pre-Alpha",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"{{ {'Apache Software License 2.0': 'License :: OSI Approved :: Apache Software License',
'MIT license': 'License :: OSI Approved :: MIT License',
'BSD license': 'License :: OSI Approved :: BSD License',
'ISC license': 'License :: OSI Approved :: ISC License (ISCL)',
'GNU General Public License v3 or later': 'License :: OSI Approved :: GNU General Public License',
'Not open source': 'License :: Other/Proprietary License'
}[license] }}",
"Natural Language :: English",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
Expand All @@ -35,7 +28,17 @@ keywords = [
"{{ item }}"{{ "," if not loop.last }}
{%- endfor -%}
]
license = {file = "LICENSE"}
{% if license != "Other" -%}
license = "{{ {'Apachev2': 'Apache-2.0',
'MIT': 'MIT',
'BSD': 'BSD-3-Clause',
'ISC': 'ISC',
'GNUv3': 'GPL-3.0-or-later',
'GNULesserv3': 'LGPL-3.0-or-later',
}[license] }}"
{% endif -%}
{#- NOTICE file is only present for Apache -#}
license-files = ["LICENSE"{% if license == "Apachev2" %}, "NOTICE"{% endif %}]
name = "{{ package_name }}"
readme = {file = "README.md", content-type = "text/markdown"}
requires-python = ">=3.10"
Expand Down