From ede6a94665a9445779ae7942c8da27018ba3cc28 Mon Sep 17 00:00:00 2001 From: Veronica Berglyd Olsen <1619840+vkbo@users.noreply.github.com> Date: Wed, 22 Oct 2025 22:32:45 +0200 Subject: [PATCH] Drop the pip command from pkgutils.py --- pkgutils.py | 42 +----------------------------------------- 1 file changed, 1 insertion(+), 41 deletions(-) diff --git a/pkgutils.py b/pkgutils.py index fc49f94d..1c17e960 100755 --- a/pkgutils.py +++ b/pkgutils.py @@ -29,7 +29,6 @@ from __future__ import annotations import argparse import datetime import shutil -import subprocess import sys import utils.assets @@ -55,33 +54,6 @@ def printVersion(args: argparse.Namespace) -> None: print(extractVersion(beQuiet=True)[0], end=None) -def installPackages(args: argparse.Namespace) -> None: - """Install package dependencies both for this script and for running - novelWriter itself. - """ - print("") - print("Installing Dependencies") - print("=======================") - print("") - - installQueue = ["pip", *extractReqs(["app"])] - if args.mac: - installQueue.append("pyobjc") - elif args.win: - installQueue.append("pywin32") - - pyCmd = [sys.executable, "-m"] - pipCmd = ["pip", "install", "--user", "--upgrade"] - for stepCmd in installQueue: - pkgCmd = stepCmd.split(" ") - try: - subprocess.call(pyCmd + pipCmd + pkgCmd) - except Exception as exc: - print("Failed with error:") - print(str(exc)) - sys.exit(1) - - def cleanBuildDirs(args: argparse.Namespace) -> None: """Recursively delete the 'build' and 'dist' folders.""" print("") @@ -160,18 +132,6 @@ if __name__ == "__main__": ) cmdVersion.set_defaults(func=printVersion) - # General - # ======= - - # Pip Install - cmdPipInstall = parsers.add_parser( - "pip", help="Install all package dependencies for novelWriter using pip." - ) - cmdPipInstall.add_argument("--linux", action="store_true", help="For Linux.", default=OS_LINUX) - cmdPipInstall.add_argument("--mac", action="store_true", help="For MacOS.", default=OS_DARWIN) - cmdPipInstall.add_argument("--win", action="store_true", help="For Windows.", default=OS_WIN) - cmdPipInstall.set_defaults(func=installPackages) - # Additional Builds # ================= @@ -320,7 +280,7 @@ if __name__ == "__main__": "groups", nargs="*", help=( "Groups to generate for, or 'all' to generate for all groups. " "Use 'app' to generate for just the core application. " - "Defaults to app dependencies." + "Defaults to 'app' if none are specified." ) ) cmdGenReq.set_defaults(func=genReqFiles)