Patch some mistakes (according to flake8)

This commit is contained in:
Valentin Niess
2025-05-20 23:27:20 +02:00
parent 331fc6ab7f
commit 60aec8ba25
13 changed files with 28 additions and 53 deletions

View File

@@ -8,7 +8,7 @@ import stat
import struct
from ...appimage import build_appimage
from ...utils.compat import decode, find_spec
from ...utils.compat import find_spec
from ...utils.deps import PREFIX
from ...utils.fs import copy_file, copy_tree, make_tree, remove_file, remove_tree
from ...utils.log import log
@@ -33,6 +33,7 @@ def _unpack_args(args):
_tag_pattern = re.compile('python([^-]+)[-]([^.]+)[.]AppImage')
_linux_pattern = re.compile('manylinux([0-9]+)_' + platform.machine())
def execute(appdir, name=None, python_version=None, linux_tag=None,
python_tag=None, base_image=None, in_tree_build=False,
extra_data=None):
@@ -311,8 +312,6 @@ def execute(appdir, name=None, python_version=None, linux_tag=None,
shebang = '#! /bin/bash'
entrypoint = load_template(entrypoint_path, **dictionary)
python_pkg = 'AppDir/opt/python{0:}/lib/python{0:}'.format(
python_version)
dictionary = {'entrypoint': entrypoint,
'shebang': shebang}
if os.path.exists('AppDir/AppRun'):

View File

@@ -1,16 +1,10 @@
import glob
import os
from pathlib import Path
import platform
import shutil
import sys
from ...appimage import build_appimage, relocate_python
from ...appimage import build_appimage
from ...manylinux import Arch, Downloader, ImageExtractor, LinuxTag, \
PythonExtractor
from ...utils.docker import docker_run
from ...utils.fs import copy_tree
from ...utils.manylinux import format_appimage_name, format_tag
from ...utils.tmp import TemporaryDirectory
@@ -23,17 +17,6 @@ def _unpack_args(args):
return args.tag, args.abi
def _get_appimage_name(abi, tag):
'''Format the Python AppImage name using the ABI and OS tags
'''
# Read the Python version from the desktop file
desktop = glob.glob('AppDir/python*.desktop')[0]
fullversion = desktop[13:-8]
# Finish building the AppImage on the host. See below.
return format_appimage_name(abi, fullversion, tag)
def execute(tag, abi):
'''Build a Python AppImage using a Manylinux image
'''