Add setup.cfg back for old Ubuntu LTSes

This commit is contained in:
Veronica Berglyd Olsen
2024-04-16 23:15:39 +02:00
parent ef85b2109f
commit 466eb65a44
2 changed files with 66 additions and 8 deletions
+18 -8
View File
@@ -675,8 +675,10 @@ def makeMinimalPackage(targetOS: int) -> None:
# Make Debian Package (build-deb)
##
def makeDebianPackage(signKey: str | None = None, sourceBuild: bool = False,
distName: str = "unstable", buildName: str = "") -> str:
def makeDebianPackage(
signKey: str | None = None, sourceBuild: bool = False,
distName: str = "unstable", buildName: str = "", oldSetuptools: bool = False
) -> str:
"""Build a Debian package."""
print("")
print("Build Debian Package")
@@ -784,6 +786,13 @@ def makeDebianPackage(signKey: str | None = None, sourceBuild: bool = False,
writeFile(f"{outDir}/pyproject.toml", setupCfg)
print("Wrote: pyproject.toml")
if oldSetuptools:
setupCfg = readFile("setup/launchpad_setup.cfg").replace(
"file: setup/description_pypi.md", "file: data/description_short.txt"
)
writeFile(f"{outDir}/setup.cfg", setupCfg)
print("Wrote: setup.cfg")
# Copy/Write Debian Files
# =======================
@@ -860,10 +869,10 @@ def makeForLaunchpad(doSign: bool = False, isFirst: bool = False) -> None:
bldNum = "0"
distLoop = [
("20.04", "focal"),
("22.04", "jammy"),
("23.10", "mantic"),
("24.04", "noble"),
("20.04", "focal", True),
("22.04", "jammy", True),
("23.10", "mantic", False),
("24.04", "noble", False),
]
print("Building Ubuntu packages for:")
@@ -881,13 +890,14 @@ def makeForLaunchpad(doSign: bool = False, isFirst: bool = False) -> None:
print("")
dputCmd = []
for distNum, codeName in distLoop:
for distNum, codeName, oldSetup in distLoop:
buildName = f"ubuntu{distNum}.{bldNum}"
dCmd = makeDebianPackage(
signKey=signKey,
sourceBuild=True,
distName=codeName,
buildName=buildName
buildName=buildName,
oldSetuptools=oldSetup,
)
dputCmd.append(dCmd)
+48
View File
@@ -0,0 +1,48 @@
[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