MCPcopy Index your code
hub / github.com/kivy/python-for-android / get_distribution

Method get_distribution

pythonforandroid/distribution.py:46–199  ·  view source on GitHub ↗

Takes information about the distribution, and decides what kind of distribution it will be. If parameters conflict (e.g. a dist with that name already exists, but doesn't have the right set of recipes), an error is thrown. Parameters ----------

(
            cls,
            ctx,
            *,
            archs,  # required keyword argument: there is no sensible default
            name=None,
            recipes=[],
            ndk_api=None,
            force_build=False,
            extra_dist_dirs=[],
            require_perfect_match=False,
            allow_replace_dist=True
    )

Source from the content-addressed store, hash-verified

44
45 @classmethod
46 def get_distribution(
47 cls,
48 ctx,
49 *,
50 archs, # required keyword argument: there is no sensible default
51 name=None,
52 recipes=[],
53 ndk_api=None,
54 force_build=False,
55 extra_dist_dirs=[],
56 require_perfect_match=False,
57 allow_replace_dist=True
58 ):
59 '''Takes information about the distribution, and decides what kind of
60 distribution it will be.
61
62 If parameters conflict (e.g. a dist with that name already
63 exists, but doesn't have the right set of recipes),
64 an error is thrown.
65
66 Parameters
67 ----------
68 name : str
69 The name of the distribution. If a dist with this name already '
70 exists, it will be used.
71 ndk_api : int
72 The NDK API to compile against, included in the dist because it cannot
73 be changed later during APK packaging.
74 archs : list
75 The target architectures list to compile against, included in the dist because
76 it cannot be changed later during APK packaging.
77 recipes : list
78 The recipes that the distribution must contain.
79 force_download: bool
80 If True, only downloaded dists are considered.
81 force_build : bool
82 If True, the dist is forced to be built locally.
83 extra_dist_dirs : list
84 Any extra directories in which to search for dists.
85 require_perfect_match : bool
86 If True, will only match distributions with precisely the
87 correct set of recipes.
88 allow_replace_dist : bool
89 If True, will allow an existing dist with the specified
90 name but incompatible requirements to be overwritten by
91 a new one with the current requirements.
92 '''
93
94 possible_dists = Distribution.get_distributions(ctx)
95 debug(f"All possible dists: {possible_dists}")
96
97 # Will hold dists that would be built in the same folder as an existing dist
98 folder_match_dist = None
99
100 # 0) Check if a dist with that name and architecture already exists
101 if name is not None and name:
102 possible_dists = [
103 d for d in possible_dists if

Calls 6

info_notifyFunction · 0.90
pretty_log_distsFunction · 0.85
DistributionClass · 0.85
get_distributionsMethod · 0.80
formatMethod · 0.80