Skip to content

Commit 7c0bc39

Browse files
committed
Build configuration again extends from flake8 configuration
For backwards compatability, we need to continue to have the build configuration extend from the flake8 configuration. Without this, any dependencies declared as part of the flake8 configuration will be excluded from the build requirements and thus excluded from the activatable virtual environment.
1 parent 963cc18 commit 7c0bc39

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

pygradle-plugin/src/main/groovy/com/linkedin/gradle/python/plugin/PythonPlugin.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,13 +155,16 @@ private static void createConfigurations(Project project) {
155155

156156
project.getConfigurations().create(CONFIGURATION_BOOTSTRAP_REQS.getValue());
157157
project.getConfigurations().create(CONFIGURATION_SETUP_REQS.getValue());
158-
project.getConfigurations().create(CONFIGURATION_BUILD_REQS.getValue());
158+
Configuration buildReq = project.getConfigurations().create(CONFIGURATION_BUILD_REQS.getValue());
159159
project.getConfigurations().create(CONFIGURATION_PYDOCS.getValue());
160160
project.getConfigurations().create(CONFIGURATION_TEST.getValue());
161161
project.getConfigurations().create(CONFIGURATION_VENV.getValue());
162162
project.getConfigurations().create(CONFIGURATION_WHEEL.getValue());
163-
// TODO: Kept for compatibility. Remove when not needed (very soon).
164-
project.getConfigurations().create("flake8");
163+
// TODO: Kept for backwards compatibility. Remove when not needed (very soon).
164+
// Even though flake8 is no longer in its own virtual env, users may still be adding libraries through the
165+
// flake8 configuration, which still needs to be added to the build config so those libraries exist in the venv.
166+
Configuration flake8 = project.getConfigurations().create("flake8");
167+
buildReq.extendsFrom(flake8);
165168
}
166169

167170
/*

0 commit comments

Comments
 (0)