dataflow-conda-plugin 0.1.7rc3__py3-none-any.whl → 0.1.7rc5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of dataflow-conda-plugin might be problematic. Click here for more details.
- {dataflow_conda_plugin-0.1.7rc3.dist-info → dataflow_conda_plugin-0.1.7rc5.dist-info}/METADATA +1 -1
- dataflow_conda_plugin-0.1.7rc5.dist-info/RECORD +8 -0
- plugin/plugin.py +27 -3
- plugin/scripts/install_dataflow_deps.sh +3 -4
- dataflow_conda_plugin-0.1.7rc3.dist-info/RECORD +0 -8
- {dataflow_conda_plugin-0.1.7rc3.dist-info → dataflow_conda_plugin-0.1.7rc5.dist-info}/WHEEL +0 -0
- {dataflow_conda_plugin-0.1.7rc3.dist-info → dataflow_conda_plugin-0.1.7rc5.dist-info}/entry_points.txt +0 -0
- {dataflow_conda_plugin-0.1.7rc3.dist-info → dataflow_conda_plugin-0.1.7rc5.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
plugin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
plugin/plugin.py,sha256=vfA-3GgQ19ExFHXr6s_LRby7zHwk3QGNQgFfUSmTzQ0,7292
|
|
3
|
+
plugin/scripts/install_dataflow_deps.sh,sha256=1IwrlU39LcVuP6QF4Safv9h59W5OVGgCieNx0Ej38N0,1265
|
|
4
|
+
dataflow_conda_plugin-0.1.7rc5.dist-info/METADATA,sha256=7hFOWigXxuoDoPyAcuwcKmYyDMANmoNBd4FdHR0S030,68
|
|
5
|
+
dataflow_conda_plugin-0.1.7rc5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
6
|
+
dataflow_conda_plugin-0.1.7rc5.dist-info/entry_points.txt,sha256=Vk2GKuQjr-5WV4NDKyPsnF37p3LUoAgPYOSMHxnpac8,46
|
|
7
|
+
dataflow_conda_plugin-0.1.7rc5.dist-info/top_level.txt,sha256=Io_dflkI6h0vZSGOzZxx4e76CDTSANVfu4v4tVY6zsA,7
|
|
8
|
+
dataflow_conda_plugin-0.1.7rc5.dist-info/RECORD,,
|
plugin/plugin.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import subprocess, sys, pkg_resources, os, requests
|
|
1
|
+
import subprocess, sys, pkg_resources, os, requests, re, sys
|
|
2
2
|
from conda import plugins
|
|
3
3
|
from conda.base.context import context
|
|
4
4
|
from dataflow.utils.logger import CustomLogger
|
|
@@ -77,7 +77,6 @@ def install_deps(command: str):
|
|
|
77
77
|
print(f"Error in creating environment!!")
|
|
78
78
|
if should_save_to_db and env_name:
|
|
79
79
|
save_environment(env_name, "Failed")
|
|
80
|
-
raise RuntimeError(f"Dataflow dependency installation failed! Please make sure compatible python version is used")
|
|
81
80
|
else:
|
|
82
81
|
if env_name and should_save_to_db:
|
|
83
82
|
save_environment(env_name, "Success")
|
|
@@ -87,7 +86,6 @@ def install_deps(command: str):
|
|
|
87
86
|
logger.error(f"Error installing dependencies: {str(e)}")
|
|
88
87
|
if should_save_to_db and env_name:
|
|
89
88
|
save_environment(env_name, "Failed")
|
|
90
|
-
raise e
|
|
91
89
|
|
|
92
90
|
def remove_environment(env_name: str):
|
|
93
91
|
"""Remove environment information via API."""
|
|
@@ -149,6 +147,24 @@ def package_operations(command: str):
|
|
|
149
147
|
if should_update_db:
|
|
150
148
|
mark_environment_for_refresh(env_name)
|
|
151
149
|
|
|
150
|
+
def set_pip_constraint(command: str):
|
|
151
|
+
"""Set PIP_CONSTRAINT environment variable based on Python version."""
|
|
152
|
+
if "NO_CONDA_PLUGIN_PIP_CONSTRAINT" in os.environ:
|
|
153
|
+
return
|
|
154
|
+
for arg in sys.argv:
|
|
155
|
+
if arg.startswith("python"):
|
|
156
|
+
# Match python=3.10, python=3.10.1, python=3.11, python=3.11.5, etc.
|
|
157
|
+
match = re.fullmatch(r"python=(3\.10(\.\d+)?|3\.11(\.\d+)?|3\.12(\.\d+)?)", arg)
|
|
158
|
+
if not match:
|
|
159
|
+
raise ValueError(f"Invalid argument: {arg}! Only Python 3.10, 3.11, and 3.12 are supported.")
|
|
160
|
+
version = match.group(1)
|
|
161
|
+
major_minor = ".".join(version.split(".")[:2])
|
|
162
|
+
break
|
|
163
|
+
else:
|
|
164
|
+
major_minor = "3.12"
|
|
165
|
+
# Set PIP_CONSTRAINT environment variable to the appropriate constraint file
|
|
166
|
+
os.environ["PIP_CONSTRAINT"] = f"/dataflow/tmp/pip_constraints/py{major_minor}-constraints.txt"
|
|
167
|
+
|
|
152
168
|
@plugins.hookimpl
|
|
153
169
|
def conda_post_commands():
|
|
154
170
|
yield plugins.CondaPostCommand(
|
|
@@ -160,4 +176,12 @@ def conda_post_commands():
|
|
|
160
176
|
name=f"package_operations_post_command",
|
|
161
177
|
action=package_operations,
|
|
162
178
|
run_for={"install", "remove", "update"},
|
|
179
|
+
)
|
|
180
|
+
|
|
181
|
+
@plugins.hookimpl
|
|
182
|
+
def conda_pre_commands():
|
|
183
|
+
yield plugins.CondaPreCommand(
|
|
184
|
+
name="set_pip_constraint",
|
|
185
|
+
action=set_pip_constraint,
|
|
186
|
+
run_for={"create"},
|
|
163
187
|
)
|
|
@@ -4,14 +4,13 @@ conda_env_path=$1
|
|
|
4
4
|
|
|
5
5
|
py_version=$(${conda_env_path}/bin/python -c "import sys; print('.'.join(map(str, sys.version_info[:2])))")
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
${conda_env_path}/bin/pip install --index-url https://pypi.org/simple/ dash==3.0.3 dash-renderer==1.9.1 plotly==6.0.1 typing==3.7.4.3 streamlit==1.45.1 ipython==9.2.0 ipykernel==6.29.5 ipython-sql==0.4.1 jupysql==0.10.14 psycopg2-binary==2.9.10 cryptography==44.0.3 dataflow-core==2.1.15rc3 dataflow-dbt==0.0.3
|
|
7
|
+
${conda_env_path}/bin/pip install --index-url https://pypi.org/simple dash==3.0.3 dash-renderer==1.9.1 plotly==6.0.1 typing==3.7.4.3 streamlit==1.45.1 ipython==8.37.0 ipykernel==6.29.5 ipython-sql==0.4.1 jupysql==0.10.14 psycopg2-binary==2.9.10 dataflow-core==2.1.14rc3 dataflow-dbt==0.0.3
|
|
9
8
|
|
|
10
9
|
# 3. Install Dataflow Airflow to a separate path in environment
|
|
11
|
-
${conda_env_path}/bin/pip install \
|
|
10
|
+
${conda_env_path}/bin/pip install --index-url https://pypi.org/simple \
|
|
12
11
|
--force-reinstall --root-user-action ignore \
|
|
13
12
|
--no-warn-conflicts dataflow-airflow==2.10.7 \
|
|
14
|
-
--constraint
|
|
13
|
+
--constraint /dataflow/setup/pip_constraints/airflow_constraints${py_version}.txt \
|
|
15
14
|
--target ${conda_env_path}/bin/airflow-libraries/
|
|
16
15
|
|
|
17
16
|
files=(
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
plugin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
plugin/plugin.py,sha256=ehGg1wEvqiEZFXwhvp8Jc4p5e0senirTd-aUNg74T5I,6352
|
|
3
|
-
plugin/scripts/install_dataflow_deps.sh,sha256=oeCw1kD-okNZyjD5fJ2pOJV6a0SphVMYTxbk2zHx2as,1331
|
|
4
|
-
dataflow_conda_plugin-0.1.7rc3.dist-info/METADATA,sha256=I6nQLgw6Be2aTeexSlrY-tbhjsC-jp4VtttEquSvUOc,68
|
|
5
|
-
dataflow_conda_plugin-0.1.7rc3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
6
|
-
dataflow_conda_plugin-0.1.7rc3.dist-info/entry_points.txt,sha256=Vk2GKuQjr-5WV4NDKyPsnF37p3LUoAgPYOSMHxnpac8,46
|
|
7
|
-
dataflow_conda_plugin-0.1.7rc3.dist-info/top_level.txt,sha256=Io_dflkI6h0vZSGOzZxx4e76CDTSANVfu4v4tVY6zsA,7
|
|
8
|
-
dataflow_conda_plugin-0.1.7rc3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
{dataflow_conda_plugin-0.1.7rc3.dist-info → dataflow_conda_plugin-0.1.7rc5.dist-info}/top_level.txt
RENAMED
|
File without changes
|