1
0
mirror of https://github.com/EDCD/EDMarketConnector.git synced 2025-04-14 16:27:13 +03:00

#2040 Retire iSort

Going to do a handover to black (New Maintainer Preference)
This commit is contained in:
David Sangrey 2023-07-26 23:18:18 -04:00
parent 247d632cc6
commit 1690f8f3a9
No known key found for this signature in database
GPG Key ID: 3AEADBB0186884BC
3 changed files with 11 additions and 10 deletions

View File

@ -1,5 +1,6 @@
""" """
build.py - Build the Installer build.py - Build the Installer.
Copyright (c) EDCD, All Rights Reserved Copyright (c) EDCD, All Rights Reserved
Licensed under the GNU General Public License. Licensed under the GNU General Public License.
See LICENSE file. See LICENSE file.
@ -10,10 +11,10 @@ import shutil
import subprocess import subprocess
import sys import sys
import pathlib import pathlib
import py2exe
from os.path import exists, join, isdir from os.path import exists, join, isdir
from tempfile import gettempdir from tempfile import gettempdir
from lxml import etree from lxml import etree
import py2exe
from config import ( from config import (
appcmdname, appcmdname,
appname, appname,
@ -25,6 +26,7 @@ from config import (
def system_check(dist_dir): def system_check(dist_dir):
"""Check if the system is able to build."""
if sys.version_info < (3, 11): if sys.version_info < (3, 11):
sys.exit(f"Unexpected Python version {sys.version}") sys.exit(f"Unexpected Python version {sys.version}")
@ -47,6 +49,7 @@ def system_check(dist_dir):
def generate_data_files(app_name, gitversion_file): def generate_data_files(app_name, gitversion_file):
"""Create the required datafiles to build."""
l10n_dir = "L10n" l10n_dir = "L10n"
fdevids_dir = "FDevIDs" fdevids_dir = "FDevIDs"
data_files = [ data_files = [
@ -86,6 +89,7 @@ def generate_data_files(app_name, gitversion_file):
def windows_installer_display_lang(app_name, filename): def windows_installer_display_lang(app_name, filename):
"""Configure the Windows Installer Display Language."""
lcids = [ lcids = [
int(x) int(x)
for x in re.search( # type: ignore for x in re.search( # type: ignore
@ -106,8 +110,9 @@ def windows_installer_display_lang(app_name, filename):
rf'cscript /nologo "{SDKPATH}\WiLangId.vbs" {gettempdir()}\{app_name}_{lcid}.msi Product {lcid}' rf'cscript /nologo "{SDKPATH}\WiLangId.vbs" {gettempdir()}\{app_name}_{lcid}.msi Product {lcid}'
) )
os.system( os.system(
rf'"{SDKPATH}\MsiTran.Exe" -g {gettempdir()}\{app_name}_1033.msi {gettempdir()}\{app_name}_{lcid}.msi {gettempdir()}\{lcid}.mst' rf'"{SDKPATH}\MsiTran.Exe" -g {gettempdir()}\{app_name}_1033.msi'
) # noqa: E501 # Not going to get shorter rf' {gettempdir()}\{app_name}_{lcid}.msi {gettempdir()}\{lcid}.mst'
)
os.system( os.system(
rf'cscript /nologo "{SDKPATH}\WiSubStg.vbs" {filename} {gettempdir()}\{lcid}.mst {lcid}' rf'cscript /nologo "{SDKPATH}\WiSubStg.vbs" {filename} {gettempdir()}\{lcid}.mst {lcid}'
) )
@ -294,7 +299,8 @@ if __name__ == "__main__":
raise AssertionError(f"No {appname}.wixobj: candle.exe failed?") raise AssertionError(f"No {appname}.wixobj: candle.exe failed?")
package_filename = f"{appname}_win_{appversion_nobuild()}.msi" package_filename = f"{appname}_win_{appversion_nobuild()}.msi"
light_command = rf'"{WIXPATH}\light.exe" -b {DIST_DIR}\ -sacl -spdb -sw1076 {appname}.wixobj -out {package_filename}' light_command = rf'"{WIXPATH}\light.exe" -b {DIST_DIR}\ -sacl -spdb ' \
rf'-sw1076 {appname}.wixobj -out {package_filename}'
subprocess.run(light_command, shell=True, check=True) subprocess.run(light_command, shell=True, check=True)
if not exists(package_filename): if not exists(package_filename):

View File

@ -1,9 +1,6 @@
[tool.autopep8] [tool.autopep8]
max_line_length = 120 max_line_length = 120
[tool.isort]
multi_line_output = 5
line_length = 119
[tool.pytest.ini_options] [tool.pytest.ini_options]
testpaths = ["tests"] # Search for tests in tests/ testpaths = ["tests"] # Search for tests in tests/

View File

@ -13,8 +13,6 @@ flake8-annotations-coverage==0.0.6
flake8-cognitive-complexity==0.1.0 flake8-cognitive-complexity==0.1.0
flake8-comprehensions==3.14.0 flake8-comprehensions==3.14.0
flake8-docstrings==1.7.0 flake8-docstrings==1.7.0
isort==5.12.0
flake8-isort==6.0.0
flake8-json==23.7.0 flake8-json==23.7.0
flake8-noqa==1.3.2 flake8-noqa==1.3.2
flake8-polyfill==1.0.2 flake8-polyfill==1.0.2