Skip to content

Commit

Permalink
Address pylint issues on build.py
Browse files Browse the repository at this point in the history
  • Loading branch information
xoriole committed Apr 8, 2024
1 parent 7bcab35 commit fd4c199
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,14 @@


def get_wheel_build_options():
from setuptools import setup
setup_options = {"build_exe": {}}
setup_executables = None
return setup, setup_options, setup_executables
from setuptools import setup as _setup # pylint: disable=import-outside-toplevel
_setup_options = {"build_exe": {}}
_setup_executables = None
return _setup, _setup_options, _setup_executables


def get_freeze_build_options():
from cx_Freeze import setup, Executable
from cx_Freeze import setup as _setup, Executable # pylint: disable=import-outside-toplevel

# These packages will be included in the build
sys.path.insert(0, 'src')
Expand Down Expand Up @@ -79,7 +79,7 @@ def get_freeze_build_options():
'matplotlib'
]

setup_options = {
_setup_options = {
"build_exe": {
"packages": included_packages,
"excludes": excluded_packages,
Expand All @@ -92,15 +92,15 @@ def get_freeze_build_options():
app_name = "Tribler" if sys.platform != "linux" else "tribler"
app_script = "src/tribler/run.py"
app_icon_path = "build/win/resources/tribler.ico" if sys.platform == "win32" else "build/mac/resources/tribler.icns"
setup_executables = [
_setup_executables = [
Executable(
target_name=app_name,
script=app_script,
base="Win32GUI" if sys.platform == "win32" else None,
icon=app_icon_path,
)
]
return setup, setup_options, setup_executables
return _setup, _setup_options, _setup_executables


# Based on the command line arguments, get the build options.
Expand Down

0 comments on commit fd4c199

Please sign in to comment.