Skip to content

Commit 2744fb2

Browse files
authored
Move to pyproject.toml (#1791)
2 parents b83042e + 7fb771e commit 2744fb2

File tree

10 files changed

+57
-80
lines changed

10 files changed

+57
-80
lines changed

.flake8

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[flake8]
2+
ignore = E133,E221,E226,E228,E241,W503
3+
max-line-length = 99
4+
exclude = docs/*

novelwriter/core/__init__.py

-3
This file was deleted.

novelwriter/dialogs/__init__.py

-3
This file was deleted.

novelwriter/extensions/__init__.py

-3
This file was deleted.

novelwriter/gui/__init__.py

-3
This file was deleted.

novelwriter/text/__init__.py

-3
This file was deleted.

novelwriter/tools/__init__.py

-3
This file was deleted.

pkgutils.py

+8-9
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,6 @@ def makeMinimalPackage(targetOS: int) -> None:
610610
"CHANGELOG.md",
611611
"requirements.txt",
612612
"pkgutils.py",
613-
"setup.cfg",
614613
"pyproject.toml",
615614
]
616615

@@ -779,11 +778,11 @@ def makeDebianPackage(signKey: str | None = None, sourceBuild: bool = False,
779778
))
780779
print("Wrote: setup.py")
781780

782-
setupCfg = readFile("setup.cfg").replace(
783-
"file: setup/description_pypi.md", "file: data/description_short.txt"
781+
setupCfg = readFile("pyproject.toml").replace(
782+
"setup/description_pypi.md", "data/description_short.txt"
784783
)
785-
writeFile(f"{outDir}/setup.cfg", setupCfg)
786-
print("Wrote: setup.cfg")
784+
writeFile(f"{outDir}/pyproject.toml", setupCfg)
785+
print("Wrote: pyproject.toml")
787786

788787
# Copy/Write Debian Files
789788
# =======================
@@ -1051,11 +1050,11 @@ def makeAppImage(sysArgs: list[str]) -> list[str]:
10511050
))
10521051
print("Wrote: setup.py")
10531052

1054-
setupCfg = readFile("setup.cfg").replace(
1055-
"file: setup/description_pypi.md", "file: data/description_short.txt"
1053+
setupCfg = readFile("pyproject.toml").replace(
1054+
"setup/description_pypi.md", "data/description_short.txt"
10561055
)
1057-
writeFile(f"{outDir}/setup.cfg", setupCfg)
1058-
print("Wrote: setup.cfg")
1056+
writeFile(f"{outDir}/pyproject.toml", setupCfg)
1057+
print("Wrote: pyproject.toml")
10591058

10601059
# Write Metadata
10611060
# ==============

pyproject.toml

+45
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,48 @@
11
[build-system]
22
requires = ["setuptools"]
33
build-backend = "setuptools.build_meta"
4+
5+
[project]
6+
name = "novelWriter"
7+
authors = [
8+
{name = "Veronica Berglyd Olsen", email = "[email protected]"},
9+
]
10+
description = "A markdown-like text editor for planning and writing novels"
11+
readme = {file = "setup/description_pypi.md", content-type = "text/markdown"}
12+
license = {text = "GNU General Public License v3"}
13+
classifiers = [
14+
"Programming Language :: Python :: 3 :: Only",
15+
"Programming Language :: Python :: 3.8",
16+
"Programming Language :: Python :: 3.9",
17+
"Programming Language :: Python :: 3.10",
18+
"Programming Language :: Python :: 3.11",
19+
"Programming Language :: Python :: 3.12",
20+
"Programming Language :: Python :: Implementation :: CPython",
21+
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
22+
"Development Status :: 5 - Production/Stable",
23+
"Operating System :: OS Independent",
24+
"Intended Audience :: End Users/Desktop",
25+
"Natural Language :: English",
26+
"Topic :: Text Editors",
27+
]
28+
requires-python = ">=3.8"
29+
dependencies = [
30+
"pyqt5>=5.10",
31+
"pyenchant>=3.0.0",
32+
]
33+
dynamic = ["version"]
34+
35+
[tool.setuptools.dynamic]
36+
version = {attr = "novelwriter.__version__"}
37+
38+
[project.urls]
39+
Homepage = "https://novelwriter.io"
40+
Documentation = "https://docs.novelwriter.io"
41+
Repository = "https://github.com/vkbo/novelWriter"
42+
Issues = "https://github.com/vkbo/novelWriter/issues"
43+
44+
[tool.setuptools.packages.find]
45+
include = ["novelwriter*"]
46+
47+
[project.gui-scripts]
48+
novelwriter = "novelwriter:main"

setup.cfg

-53
This file was deleted.

0 commit comments

Comments
 (0)