Skip to content

Commit d91c72c

Browse files
authored
Merge pull request #331 from elautz/flake8-config-fix
Build configuration again extends from flake8 configuration
2 parents 963cc18 + 7c0bc39 commit d91c72c

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)