Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install python deps declared in setup.py #1111

Merged
merged 3 commits into from
Nov 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
-e ../airbyte-protocol
-e .
dbt==0.18.1
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think someone put a non-local dependency here, because setup.py wasn't doing the installation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I added that there at some point to make some task work somehow... Not sure if you remove it, it's going to do well or not...

The way Airbyte is building python packages is really weird and i don't think it's following proper python recommendations, for example I don't understand why we do some things in setup.py and are using requirements.txt files in this way... (see here

Then lately i also run in such build failures that could be related:
Screenshot 2020-11-30 at 14 21 26

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')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do these files exist? i haven't been able to find them. pattern matched the naming convention above.

outputs.cacheIf { true }
}
Expand Down