Skip to content

Commit 70f5703

Browse files
committed
lite: Fix issue where RTD build failed due to conflicting deps from dev wheel vs. lite addon
1 parent a62ae1e commit 70f5703

File tree

1 file changed

+15
-7
lines changed

1 file changed

+15
-7
lines changed

dodo.py

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,17 @@ def task_lite():
175175

176176
def _clean_wheels():
177177
# Remove wheels that conflict with pyolite shims
178-
subprocess.check_call(["rm", *(LITE / "pypi").glob("ipykernel-*")])
179-
subprocess.check_call(["rm", *(LITE / "pypi").glob("widgetsnbextension-*")])
178+
for path in (LITE / "pypi").glob("ipykernel-*"):
179+
os.unlink(path)
180+
for path in (LITE / "pypi").glob("widgetsnbextension-*"):
181+
os.unlink(path)
180182
# Remove binary wheels
181-
subprocess.check_call(["rm", *(set((LITE / "pypi").glob("*")) - (set((LITE / "pypi").glob("*-none-any.whl"))))])
183+
for path in set((LITE / "pypi").glob("*")) - (set((LITE / "pypi").glob("*-none-any.whl"))):
184+
os.unlink(path)
185+
# Remove addon fetched
186+
for path in json.loads((EXT / "py_src" / "jupyterlite_robotkernel" / "addons" / "wheels.json").read_text()):
187+
for path_ in (LITE / "pypi").glob(path.rsplit("/")[-1]):
188+
os.unlink(path_)
182189

183190
yield dict(
184191
name="wheels",
@@ -190,9 +197,10 @@ def _clean_wheels():
190197
cwd=str(LITE / "pypi"),
191198
shell=False,
192199
),
200+
# Not sure, why these were not discovered from conda environment
193201
doit.tools.CmdAction(
194-
[PY, "-m", "pip", "wheel", "--prefer-binary", "jupyterlab-robotmode", "jupyterlab-widgets", "jupyter-videochat"],
195-
cwd=str(LITE / "pypi"),
202+
[PY, "-m", "pip", "wheel", "--no-deps", "--prefer-binary", "jupyterlab-robotmode", "jupyterlab-widgets"],
203+
cwd=str(LITE),
196204
shell=False,
197205
),
198206
_clean_wheels,
@@ -211,9 +219,9 @@ def _build():
211219
"--LiteBuildConfig.federated_extensions",
212220
f"{list(LITE.glob('jupyter_videochat*'))[-1]}",
213221
"--LiteBuildConfig.federated_extensions",
214-
f"{list((LITE / 'pypi').glob('jupyterlab_widgets*'))[-1]}",
222+
f"{list(LITE.glob('jupyterlab_widgets*'))[-1]}",
215223
"--LiteBuildConfig.federated_extensions",
216-
f"{list((LITE / 'pypi').glob('jupyterlab_robotmode*'))[-1]}",
224+
f"{list(LITE.glob('jupyterlab_robotmode*'))[-1]}",
217225
"--LiteBuildConfig.federated_extensions",
218226
EXT_WHL,
219227
],

0 commit comments

Comments
 (0)