diff --git a/.flake8 b/.flake8 new file mode 100644 index 00000000..adf39902 --- /dev/null +++ b/.flake8 @@ -0,0 +1,4 @@ +[flake8] +ignore = E133,E221,E226,E228,E241,W503 +max-line-length = 99 +exclude = docs/* diff --git a/novelwriter/core/__init__.py b/novelwriter/core/__init__.py deleted file mode 100644 index 4d11a469..00000000 --- a/novelwriter/core/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -""" -novelWriter – Core Init File -""" diff --git a/novelwriter/dialogs/__init__.py b/novelwriter/dialogs/__init__.py deleted file mode 100644 index 832643f4..00000000 --- a/novelwriter/dialogs/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -""" -novelWriter – Dialogs Init File -""" diff --git a/novelwriter/extensions/__init__.py b/novelwriter/extensions/__init__.py deleted file mode 100644 index 6e4c5a4e..00000000 --- a/novelwriter/extensions/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -""" -novelWriter – Custom Layouts and Widgets -""" diff --git a/novelwriter/gui/__init__.py b/novelwriter/gui/__init__.py deleted file mode 100644 index 8c88b4d3..00000000 --- a/novelwriter/gui/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -""" -novelWriter – GUI Init File -""" diff --git a/novelwriter/text/__init__.py b/novelwriter/text/__init__.py deleted file mode 100644 index 69bc7fa4..00000000 --- a/novelwriter/text/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -""" -novelWriter – Text Analysis Tools -""" diff --git a/novelwriter/tools/__init__.py b/novelwriter/tools/__init__.py deleted file mode 100644 index 9b89f220..00000000 --- a/novelwriter/tools/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -""" -novelWriter – Tools Init File -""" diff --git a/pkgutils.py b/pkgutils.py index 641a867a..2144000a 100755 --- a/pkgutils.py +++ b/pkgutils.py @@ -610,7 +610,6 @@ def makeMinimalPackage(targetOS: int) -> None: "CHANGELOG.md", "requirements.txt", "pkgutils.py", - "setup.cfg", "pyproject.toml", ] @@ -779,11 +778,11 @@ def makeDebianPackage(signKey: str | None = None, sourceBuild: bool = False, )) print("Wrote: setup.py") - setupCfg = readFile("setup.cfg").replace( - "file: setup/description_pypi.md", "file: data/description_short.txt" + setupCfg = readFile("pyproject.toml").replace( + "setup/description_pypi.md", "data/description_short.txt" ) - writeFile(f"{outDir}/setup.cfg", setupCfg) - print("Wrote: setup.cfg") + writeFile(f"{outDir}/pyproject.toml", setupCfg) + print("Wrote: pyproject.toml") # Copy/Write Debian Files # ======================= @@ -1051,11 +1050,11 @@ def makeAppImage(sysArgs: list[str]) -> list[str]: )) print("Wrote: setup.py") - setupCfg = readFile("setup.cfg").replace( - "file: setup/description_pypi.md", "file: data/description_short.txt" + setupCfg = readFile("pyproject.toml").replace( + "setup/description_pypi.md", "data/description_short.txt" ) - writeFile(f"{outDir}/setup.cfg", setupCfg) - print("Wrote: setup.cfg") + writeFile(f"{outDir}/pyproject.toml", setupCfg) + print("Wrote: pyproject.toml") # Write Metadata # ============== diff --git a/pyproject.toml b/pyproject.toml index fed528d4..b6d40d9d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,48 @@ [build-system] requires = ["setuptools"] build-backend = "setuptools.build_meta" + +[project] +name = "novelWriter" +authors = [ + {name = "Veronica Berglyd Olsen", email = "code@vkbo.net"}, +] +description = "A markdown-like text editor for planning and writing novels" +readme = {file = "setup/description_pypi.md", content-type = "text/markdown"} +license = {text = "GNU General Public License v3"} +classifiers = [ + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: Implementation :: CPython", + "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", + "Development Status :: 5 - Production/Stable", + "Operating System :: OS Independent", + "Intended Audience :: End Users/Desktop", + "Natural Language :: English", + "Topic :: Text Editors", +] +requires-python = ">=3.8" +dependencies = [ + "pyqt5>=5.10", + "pyenchant>=3.0.0", +] +dynamic = ["version"] + +[tool.setuptools.dynamic] +version = {attr = "novelwriter.__version__"} + +[project.urls] +Homepage = "https://novelwriter.io" +Documentation = "https://docs.novelwriter.io" +Repository = "https://github.com/vkbo/novelWriter" +Issues = "https://github.com/vkbo/novelWriter/issues" + +[tool.setuptools.packages.find] +include = ["novelwriter*"] + +[project.gui-scripts] +novelwriter = "novelwriter:main" diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 103e9bfc..00000000 --- a/setup.cfg +++ /dev/null @@ -1,53 +0,0 @@ -[metadata] -name = novelWriter -version = attr: novelwriter.__version__ -author = Veronica Berglyd Olsen -author_email = code@vkbo.net -description = A markdown-like text editor for planning and writing novels -url = https://novelwriter.io -long_description = file: setup/description_pypi.md -long_description_content_type = text/markdown -license_files = LICENSE.md -license = GNU General Public License v3 -classifiers = - Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Programming Language :: Python :: 3.11 - Programming Language :: Python :: 3.12 - Programming Language :: Python :: Implementation :: CPython - License :: OSI Approved :: GNU General Public License v3 (GPLv3) - Development Status :: 5 - Production/Stable - Operating System :: OS Independent - Intended Audience :: End Users/Desktop - Natural Language :: English - Topic :: Text Editors -project_urls = - Bug Tracker = https://github.com/vkbo/novelWriter/issues - Documentation = https://docs.novelwriter.io - Source Code = https://github.com/vkbo/novelWriter - -[options] -zip_safe = False -python_requires = >=3.8 -include_package_data = True -packages = find_namespace: -install_requires = - pyqt5>=5.10 - pyenchant>=3.0.0 - -[options.packages.find] -include = novelwriter* - -[options.entry_points] -gui_scripts = - novelwriter = novelwriter:main - -[bdist_wheel] -universal = 0 - -[flake8] -ignore = E133,E221,E226,E228,E241,W503 -max-line-length = 99 -exclude = docs/*