From 3aedc23af8ca7a1c79e719af5c82c0c7d057c1a3 Mon Sep 17 00:00:00 2001 From: Ansh Dadwal Date: Thu, 25 Jun 2026 10:55:33 +0530 Subject: [PATCH] Move --use-setup-py and --ignore-setup-py to generic_parser for create subcommand --- pythonforandroid/toolchain.py | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/pythonforandroid/toolchain.py b/pythonforandroid/toolchain.py index eaaeb8f2e..0d06797a3 100644 --- a/pythonforandroid/toolchain.py +++ b/pythonforandroid/toolchain.py @@ -332,6 +332,20 @@ def __init__(self): dest="blacklist_requirements", default='') + generic_parser.add_argument( + '--use-setup-py', dest="use_setup_py", + action='store_true', default=False, + help="Process the setup.py of a project if present. " + + "(Experimental!") + generic_parser.add_argument( + '--ignore-setup-py', dest="ignore_setup_py", + action='store_true', default=False, + help="Don't run the setup.py of a project if present. " + + "This may be required if the setup.py is not " + + "designed to work inside p4a (e.g. by installing " + + "dependencies that won't work or aren't desired " + + "on Android") + generic_parser.add_argument( '--bootstrap', help='The bootstrap to build with. Leave unset to choose ' @@ -497,19 +511,7 @@ def __init__(self): help='the directory with the app source code files' + ' (containing your main.py entrypoint)', required=False, default=None) - parser_packaging.add_argument( - '--use-setup-py', dest="use_setup_py", - action='store_true', default=False, - help="Process the setup.py of a project if present. " + - "(Experimental!") - parser_packaging.add_argument( - '--ignore-setup-py', dest="ignore_setup_py", - action='store_true', default=False, - help="Don't run the setup.py of a project if present. " + - "This may be required if the setup.py is not " + - "designed to work inside p4a (e.g. by installing " + - "dependencies that won't work or aren't desired " + - "on Android") + parser_packaging.add_argument( '--release', dest='build_mode', action='store_const', const='release', default='debug',