Skip to content

Commit

Permalink
Install python deps declared in setup.py (#1111)
Browse files Browse the repository at this point in the history
  • Loading branch information
cgardens authored Nov 30, 2020
1 parent 83fc3e5 commit 31c3f06
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
-e ../airbyte-protocol
-e .
dbt==0.18.1
11 changes: 10 additions & 1 deletion buildSrc/src/main/groovy/airbyte-python.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,19 @@ class AirbytePythonPlugin implements Plugin<Project> {
command = ". --config ${project.rootProject.file('tools/python/.flake8').absolutePath}"
}

project.task('installReqs', type: PythonTask) {
// attempt to install anything in requirements.txt. by convention this should only be dependencies whose source is located in the project.
project.task('installLocalReqs', type: PythonTask) {
module = "pip"
command = "install -r requirements.txt"
inputs.file('requirements.txt')
outputs.file('build/installedlocalreqs.txt')
outputs.cacheIf { true }
}

project.task('installReqs', type: PythonTask, dependsOn: project.installLocalReqs) {
module = "pip"
command = "install .[main]"
inputs.file('setup.py')
outputs.file('build/installedreqs.txt')
outputs.cacheIf { true }
}
Expand Down

0 comments on commit 31c3f06

Please sign in to comment.