FIXUP: At this point, I'm just rambling

This commit is contained in:
Alex Pyrgiotis 2024-09-18 18:33:26 +03:00
parent f6f9ff16e1
commit 8539c97421
No known key found for this signature in database
GPG key ID: B6C15EBA0357C9AA
5 changed files with 12 additions and 9 deletions

View file

@ -123,6 +123,7 @@ jobs:
macOS:
name: "macOS (${{ matrix.arch }})"
runs-on: ${{ matrix.runner }}
needs: download-tessdata
strategy:
matrix:
include:

View file

@ -69,9 +69,10 @@ def build(build_dir, qubes=False):
container_tar_gz = root / "share" / "container.tar.gz"
container_tar_gz_bak = root / "container.tar.gz.bak"
if tessdata.exists():
tessdata.rename(tessdata_bak)
stash_container = qubes and container_tar_gz.exists()
if stash_container:
if stash_container and container_tar_gz.exists():
container_tar_gz.rename(container_tar_gz_bak)
try:
subprocess.run(["poetry", "build", "-f", "sdist"], cwd=root, check=True)
@ -81,8 +82,9 @@ def build(build_dir, qubes=False):
shutil.copy2(sdist_path, build_dir / "SOURCES" / sdist_name)
sdist_path.unlink()
finally:
if tessdata_bak.exists():
tessdata_bak.rename(tessdata)
if stash_container:
if stash_container and container_tar_gz_bak.exists():
container_tar_gz_bak.rename(container_tar_gz)
print("* Building RPM package")

View file

@ -5,7 +5,6 @@ import subprocess
import sys
from pathlib import Path
DZ_VENDOR_DIR = Path("./dangerzone/vendor")

1
poetry.lock generated
View file

@ -1046,3 +1046,4 @@ type = ["pytest-mypy"]
[metadata]
lock-version = "2.0"
python-versions = ">=3.9,<3.13"
content-hash = "93097a7d09c23ca12dbedd440965381fdd12dca2a8b1a0defe0f75b0e4e2092a"