From 56d8c507e2416e40140f85228283fa524f8b68f1 Mon Sep 17 00:00:00 2001 From: Timmy Welch Date: Sat, 29 Jun 2024 17:15:13 -0700 Subject: [PATCH] Use a directory that isn't deleted --- build-tools/get_appimage.py | 3 +-- setup.cfg | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/build-tools/get_appimage.py b/build-tools/get_appimage.py index 7b417e6..efc1021 100644 --- a/build-tools/get_appimage.py +++ b/build-tools/get_appimage.py @@ -3,7 +3,6 @@ from __future__ import annotations import argparse import os import pathlib -import stat try: import niquests as requests @@ -30,7 +29,7 @@ if opts.APPIMAGETOOL.exists(): urlretrieve( "https://github.com/AppImage/AppImageKit/releases/latest/download/appimagetool-x86_64.AppImage", opts.APPIMAGETOOL ) -os.chmod(opts.APPIMAGETOOL, stat.S_IRWXU) +os.chmod(opts.APPIMAGETOOL, 0o0700) if not opts.APPIMAGETOOL.exists(): raise SystemExit(1) diff --git a/setup.cfg b/setup.cfg index cddb644..dc69ee1 100644 --- a/setup.cfg +++ b/setup.cfg @@ -240,7 +240,7 @@ deps = requests allowlist_externals = {tox_root}/build/appimagetool-x86_64.AppImage -change_dir = {tox_root}/build +change_dir = {tox_root}/dist/binary commands_pre = -python -c 'import shutil; shutil.rmtree("{tox_root}/build/", ignore_errors=True)' python {tox_root}/build-tools/get_appimage.py {tox_root}/build/appimagetool-x86_64.AppImage