Skip to content

Commit 2daf73b

Browse files
Merge pull request #80 from matmair/pyproject-switch
Switch to pyproject.toml from setup.py
2 parents 1976c6a + aa7591d commit 2daf73b

File tree

2 files changed

+38
-59
lines changed

2 files changed

+38
-59
lines changed

plugin_creator/template/{{ cookiecutter.plugin_name }}/pyproject.toml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,45 @@
1+
#This file is used to package the {{ cookiecutter.plugin_name }} plugin.
2+
#
3+
#- It was generated by the InvenTree Plugin Creator tool - version {{ cookiecutter.plugin_creator_version }}
4+
#- Ref: {{ cookiecutter.plugin_creator_url }}
5+
16
[build-system]
27
requires = ["setuptools", "twine", "wheel"]
38
build-backend = "setuptools.build_meta"
49

10+
[project]
11+
name = "{{ cookiecutter.distribution_name }}"
12+
description = "{{ cookiecutter.plugin_description }}"
13+
dynamic = ["version"]
14+
authors = [
15+
{ name = "{{ cookiecutter.author_name }}", {%- if cookiecutter.author_email %}email = "{{ cookiecutter.author_email }}" },{%- endif %}
16+
]
17+
readme = "README.md"
18+
license = "{{ cookiecutter.license_key }}"
19+
keywords = ["inventree", "plugin"]
20+
requires-python = ">=3.9"
21+
dependencies = [
22+
# Enter your plugin library dependencies here
23+
]
24+
classifiers = [
25+
"Programming Language :: Python :: 3",
26+
"Operating System :: OS Independent",
27+
"Framework :: InvenTree",
28+
]
29+
30+
{%- if cookiecutter.project_url %}
31+
[project.urls]
32+
Homepage = "{{ cookiecutter.project_url }}"
33+
{%- endif %}
34+
35+
[project.entry-points."inventree_plugins"]
36+
{{ cookiecutter.plugin_name }} = "{{ cookiecutter.package_name }}.core:{{ cookiecutter.plugin_name }}"
37+
38+
[tool.setuptools.packages.find]
39+
where = [""]
40+
41+
[tool.setuptools.dynamic]
42+
version = {attr = "{{ cookiecutter.package_name }}.PLUGIN_VERSION"}
543

644
[tool.ruff]
745
exclude = [

plugin_creator/template/{{ cookiecutter.plugin_name }}/setup.py

Lines changed: 0 additions & 59 deletions
This file was deleted.

0 commit comments

Comments
 (0)