Fix Ubuntu builds for 20.04 and 22.04, and bump to 2.5 alpha 2

This commit is contained in:
Veronica Berglyd Olsen
2024-04-16 23:25:30 +02:00
parent 5da30e6608
commit f45170850c
3 changed files with 69 additions and 11 deletions
+19 -9
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,15 +869,15 @@ 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:")
print("")
for distNum, codeName in distLoop:
for distNum, codeName, oldSetup in distLoop:
print(f" * Ubuntu {distNum} {codeName.title()}")
print("")
@@ -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)