Skip to content

Commit

Permalink
Merge pull request #1689 from JonasT/rename_blacklist_opt
Browse files Browse the repository at this point in the history
Rename misguided shadowing --blacklist to --blacklist-requirements
  • Loading branch information
inclement authored Feb 7, 2019
2 parents 5aa322d + 50b7dc0 commit e86f346
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions doc/source/buildoptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -245,18 +245,18 @@ options (this list may not be exhaustive):
- ``--resource``: A key=value pair to add in the string.xml resource file.


Blacklist (APK size optimization)
---------------------------------
Requirements blacklist (APK size optimization)
----------------------------------------------

To optimize the size of the `.apk` file that p4a builds for you,
you can **blacklist** certain core components. Per default, p4a
will add python *with batteries included* as would be expected on
desktop, including openssl, sqlite3 and other components you may
not use.

To blacklist an item, specify the ``--blacklist`` option::
To blacklist an item, specify the ``--blacklist-requirements`` option::

p4a apk ... --blacklist=sqlite3
p4a apk ... --blacklist-requirements=sqlite3

At the moment, the following core components can be blacklisted
(if you don't want to use them) to decrease APK size:
Expand Down
6 changes: 3 additions & 3 deletions pythonforandroid/toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def build_dist_from_args(ctx, dist, args):
"""Parses out any bootstrap related arguments, and uses them to build
a dist."""
bs = Bootstrap.get_bootstrap(args.bootstrap, ctx)
blacklist = getattr(args, "blacklist", "").split(",")
blacklist = getattr(args, "blacklist_requirements", "").split(",")
if len(blacklist) == 1 and blacklist[0] == "":
blacklist = []
build_order, python_modules, bs = (
Expand Down Expand Up @@ -310,10 +310,10 @@ def __init__(self):
default='')

generic_parser.add_argument(
'--blacklist',
'--blacklist-requirements',
help=('Blacklist an internal recipe from use. Allows '
'disabling Python 3 core modules to save size'),
dest="blacklist",
dest="blacklist_requirements",
default='')

generic_parser.add_argument(
Expand Down

0 comments on commit e86f346

Please sign in to comment.