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

Constraints file does not get created for monorepos #249

Open
krassowski opened this issue Oct 14, 2024 · 1 comment · May be fixed by #250
Open

Constraints file does not get created for monorepos #249

krassowski opened this issue Oct 14, 2024 · 1 comment · May be fixed by #250
Labels
bug Something isn't working

Comments

@krassowski
Copy link
Member

Description

It seems that a wheel for monorepo does not include a top-level METADATA to extract the constraints from. This means that reqs remains empty:

archive = ZipFile(fname)
reqs = []
for f in archive.namelist():
if f.endswith("METADATA"):
for li in archive.open(f).read().decode("utf-8").split("\n"):
if li.startswith("Requires-Dist"):
reqs.append(li.replace("Requires-Dist: ", ""))
archive.close()

Reproduce

https://github.com/jupyterlab/jupyter-ai/actions/runs/11295357412/job/31417885693?pr=1029

Expected behavior

Follows the dependencies in monorepos like https://github.com/jupyterlab/jupyter-collaboration or https://github.com/jupyterlab/jupyter-ai which produce METADATA like:

Metadata-Version: 2.3
Name: jupyter-collaboration-monorepo
Version: 3.0.0b6
License-File: LICENSE
Requires-Python: >=3.8
Requires-Dist: jupyter-collaboration-ui@ file:///some/path/jupyter_collaboration/projects/jupyter-collaboration-ui
Requires-Dist: jupyter-collaboration@ file:///some/path/jupyter_collaboration/projects/jupyter-collaboration
Requires-Dist: jupyter-docprovider@ file:///some/path/jupyter_collaboration/projects/jupyter-docprovider
Requires-Dist: jupyter-server-ydoc@ file:///some/path/jupyter_collaboration/projects/jupyter-server-ydoc
Provides-Extra: dev
Requires-Dist: click; extra == 'dev'
Requires-Dist: jupyter-releaser; extra == 'dev'
Requires-Dist: pre-commit; extra == 'dev'
Requires-Dist: tomlkit; extra == 'dev'
Provides-Extra: docs
Requires-Dist: jupyterlab>=4.0.0; extra == 'docs'
Requires-Dist: myst-parser; extra == 'docs'
Requires-Dist: pydata-sphinx-theme; extra == 'docs'
Requires-Dist: sphinx; extra == 'docs'
Provides-Extra: test
Requires-Dist: jupyter-server-ydoc[test]@ file:///some/path/jupyter_collaboration/projects/jupyter-server-ydoc ; extra == 'test'

in jupyter_collaboration_monorepo-3.0.0b6.dist-info

Context

jupyterlab/jupyter-ai#1029

@krassowski krassowski added the bug Something isn't working label Oct 14, 2024
@krassowski
Copy link
Member Author

So it looks like we would want to run build on each project and concatenate the result. To simplify things we could build the wheels using Python API of build module for all the projects: monorepo and the dependencies referenced via file: protocol. I am not sure if we want this to be recursive, but probably yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant