Skip to content

Commit 4b84eff

Browse files
committed
feat(build): Use python symlink from virtual env in all uv pip install commands
1 parent 2e54461 commit 4b84eff

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

metadata-ingestion-modules/airflow-plugin/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if (extra_pip_extras != "") {
2020
ext.extra_pip_extras = "," + extra_pip_extras
2121
}
2222

23-
def pip_install_command = "VIRTUAL_ENV=${venv_name} ${venv_name}/bin/uv pip install -e ../../metadata-ingestion"
23+
def pip_install_command = "VIRTUAL_ENV=${venv_name} ${venv_name}/bin/uv pip install -p ${venv_name}/bin/${python_executable} -e ../../metadata-ingestion"
2424

2525
task environmentSetup(type: Exec) {
2626
def sentinel_file = "${venv_name}/.venv_environment_sentinel"

metadata-ingestion-modules/dagster-plugin/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ if (!project.hasProperty("extra_pip_requirements")) {
1313
ext.extra_pip_requirements = ""
1414
}
1515

16-
def pip_install_command = "VIRTUAL_ENV=${venv_name} ${venv_name}/bin/uv pip install -e ../../metadata-ingestion"
16+
def pip_install_command = "VIRTUAL_ENV=${venv_name} ${venv_name}/bin/uv pip install -p ${venv_name}/bin/${python_executable} -e ../../metadata-ingestion"
1717

1818
task checkPythonVersion(type: Exec) {
1919
commandLine python_executable, '-c', 'import sys; assert sys.version_info >= (3, 8)'

metadata-ingestion-modules/gx-plugin/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ if (!project.hasProperty("extra_pip_requirements")) {
1313
ext.extra_pip_requirements = ""
1414
}
1515

16-
def pip_install_command = "VIRTUAL_ENV=${venv_name} ${venv_name}/bin/uv pip install -e ../../metadata-ingestion"
16+
def pip_install_command = "VIRTUAL_ENV=${venv_name} ${venv_name}/bin/uv pip install -p ${venv_name}/bin/${python_executable} -e ../../metadata-ingestion"
1717

1818
task checkPythonVersion(type: Exec) {
1919
commandLine python_executable, '-c', 'import sys; assert sys.version_info >= (3, 8)'

metadata-ingestion-modules/prefect-plugin/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ if (!project.hasProperty("extra_pip_requirements")) {
1313
ext.extra_pip_requirements = ""
1414
}
1515

16-
def pip_install_command = "VIRTUAL_ENV=${venv_name} ${venv_name}/bin/uv pip install -e ../../metadata-ingestion"
16+
def pip_install_command = "VIRTUAL_ENV=${venv_name} ${venv_name}/bin/uv pip install -p ${venv_name}/bin/${python_executable} -e ../../metadata-ingestion"
1717

1818
task checkPythonVersion(type: Exec) {
1919
commandLine python_executable, '-c', 'import sys; assert sys.version_info >= (3, 7)'

metadata-ingestion/build.gradle

+6-6
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ task environmentSetup(type: Exec, dependsOn: checkPythonVersion) {
2424
outputs.file(sentinel_file)
2525
commandLine 'bash', '-c',
2626
"${python_executable} -m venv ${venv_name} && " +
27-
"${venv_name}/bin/python -m pip install --upgrade pip uv wheel 'setuptools>=63.0.0' && " +
27+
"${venv_name}/bin/${python_executable} -m pip install --upgrade pip uv wheel 'setuptools>=63.0.0' && " +
2828
"touch ${sentinel_file}"
2929
}
3030

@@ -34,7 +34,7 @@ task installPackageOnly(type: Exec, dependsOn: environmentSetup) {
3434
outputs.file(sentinel_file)
3535
commandLine 'bash', '-c',
3636
"source ${venv_name}/bin/activate && set -x && " +
37-
"uv pip install -e . &&" +
37+
"uv pip install -p ${venv_name}/bin/${python_executable} -e . &&" +
3838
"touch ${sentinel_file}"
3939
}
4040

@@ -44,7 +44,7 @@ task installPackage(type: Exec, dependsOn: installPackageOnly) {
4444
outputs.file(sentinel_file)
4545
commandLine 'bash', '-c',
4646
"source ${venv_name}/bin/activate && set -x && " +
47-
"uv pip install -e . ${extra_pip_requirements} && " +
47+
"uv pip install -p ${venv_name}/bin/${python_executable} -e . ${extra_pip_requirements} && " +
4848
"touch ${sentinel_file}"
4949
}
5050

@@ -74,7 +74,7 @@ task installDev(type: Exec, dependsOn: [install]) {
7474
outputs.file(sentinel_file)
7575
commandLine 'bash', '-c',
7676
"source ${venv_name}/bin/activate && set -x && " +
77-
"uv pip install -e .[dev] ${extra_pip_requirements} && " +
77+
"uv pip install -p ${venv_name}/bin/${python_executable} -e .[dev] ${extra_pip_requirements} && " +
7878
"touch ${sentinel_file}"
7979
}
8080

@@ -84,7 +84,7 @@ task installAll(type: Exec, dependsOn: [install]) {
8484
outputs.file(sentinel_file)
8585
commandLine 'bash', '-c',
8686
"source ${venv_name}/bin/activate && set -x && " +
87-
"uv pip install -e .[all] ${extra_pip_requirements} && " +
87+
"uv pip install -p ${venv_name}/bin/${python_executable} -e .[all] ${extra_pip_requirements} && " +
8888
"touch ${sentinel_file}"
8989
}
9090

@@ -145,7 +145,7 @@ task installDevTest(type: Exec, dependsOn: [install]) {
145145
outputs.file(sentinel_file)
146146
commandLine 'bash', '-c',
147147
"source ${venv_name}/bin/activate && set -x && " +
148-
"uv pip install -e .[dev,integration-tests] ${extra_pip_requirements} && " +
148+
"uv pip install -p ${venv_name}/bin/${python_executable} -e .[dev,integration-tests] ${extra_pip_requirements} && " +
149149
"touch ${sentinel_file}"
150150
}
151151

0 commit comments

Comments
 (0)