File tree 1 file changed +10
-2
lines changed
1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -118,15 +118,23 @@ class PkgCfgProvider:
118
118
def __init__ (self ):
119
119
self .pkgs = {}
120
120
121
- def detect_pkgs (self ):
121
+ def detect_pkgs (self ) -> None :
122
+ """
123
+ Detect and load packages under the robotpybuild entry point group.
124
+ Only loads packages that are dependencies.
125
+ """
122
126
deps_names = set ().union (* [pkg .depends for pkg in self .pkgs .values ()])
123
127
entry_points = list (iter_entry_points (group = "robotpybuild" , name = None ))
124
128
129
+ # Only load the dependencies of the package we're building.
130
+ # If we load the [package being built], then the current build will fail.
131
+ # If we load a package that depends on the [package being built],
132
+ # then the [package being built] will be loaded and the current build will fail.
125
133
run_loop = True
126
134
while run_loop :
127
135
run_loop = False
128
136
for ep in entry_points :
129
- if ep .name in self .pkgs :
137
+ if ep .name in self .pkgs : # Prevents loading the package being built
130
138
continue
131
139
if ep .name not in deps_names and ep .name != "robotpy-build" :
132
140
continue
You can’t perform that action at this time.
0 commit comments