Skip to content

py-jupyter-packaging: remove duplicate packages#38671

Merged
adamjstewart merged 3 commits intospack:developfrom
adamjstewart:packages/py-jupyter-packaging
Oct 10, 2023
Merged

py-jupyter-packaging: remove duplicate packages#38671
adamjstewart merged 3 commits intospack:developfrom
adamjstewart:packages/py-jupyter-packaging

Conversation

@adamjstewart
Copy link
Copy Markdown
Member

Not possible to merge at the moment but should help test #38447 @alalazo

Example of current behavior on develop:

> spack spec py-jupytext                                                                                                                                                                                        0.1s
==> Error: concretization failed for the following reasons:

   1. Cannot select a single "version" for package "py-jupyter-packaging"
   2. Cannot satisfy 'py-jupyter-packaging@0.9:1'
   3. Cannot satisfy 'py-jupyter-packaging@0.9:0'
   4. Cannot satisfy 'py-jupyter-packaging@0.8:'
   5. Cannot satisfy 'py-jupyter-packaging@0.7.9:0.7'
   6. Cannot satisfy 'py-jupyter-packaging@0.7.3:0.7'
   7. Cannot satisfy 'py-jupyter-packaging@0.10:1'

@alalazo
Copy link
Copy Markdown
Member

alalazo commented Jul 2, 2023

@adamjstewart Currently, I have to add:

tags = ["build-tools"]

to py-jupyter-packaging - to mark it as a package that might have multiple nodes in the DAG. Once that is done with #38447 and:

$ spack -c concretizer:duplicates:strategy:minimal graph --color -d py-jupytext

I get the following DAG, which contains both py-jupyter-packaging@0.12 and py-jupyter-packaging@0.7:

py-jupytext

@adamjstewart
Copy link
Copy Markdown
Member Author

Interesting solution to the speed issue. I'm not opposed.

@alalazo alalazo self-assigned this Jul 4, 2023
@adamjstewart adamjstewart force-pushed the packages/py-jupyter-packaging branch from 066c9c1 to 4c4e858 Compare August 16, 2023 00:34
@adamjstewart adamjstewart marked this pull request as ready for review August 16, 2023 00:36
@adamjstewart
Copy link
Copy Markdown
Member Author

This now works but requires the minimal duplication strategy.

# type=('build', 'run'))
depends_on("py-jupyter-packaging@0.9:1", when="@3.4.8", type="build")
depends_on("py-jupyter-packaging@0.9:0", when="@3.0.15:3.4.2", type="build")
depends_on("py-jupyter-packaging@0.7.3:0.7", when="@3.0.0:3.0.14", type=("build", "run"))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why build + run in this line?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Because it's (erroneously) listed under install_requires instead of setup_requires: https://github.com/jupyterlab/jupyterlab/blob/v3.0.14/setup.py#L149. This was fixed in jupyterlab/jupyterlab#10217 and backported to 3.0.15.

If this is problematic for concretization we could make it build-only or even deprecate and remove 3.0.14.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

If we can deprecate and remove that version, that would be good. This one is not problematic per-se, but it would be if more than one needed version is of type "run".

@alalazo alalazo force-pushed the packages/py-jupyter-packaging branch from e6462aa to 4ea61cd Compare October 6, 2023 12:54
@alalazo
Copy link
Copy Markdown
Member

alalazo commented Oct 9, 2023

I have been able to build py-jupytext with this PR:

Screenshot from 2023-10-09 15-56-10

It uses 2 versions of py-jupyter-packaging and py-setuptools:

Screenshot from 2023-10-09 15-58-29

@adamjstewart Feel free to merge as soon as you are confident that this works for you

@adamjstewart adamjstewart merged commit 620835e into spack:develop Oct 10, 2023
@adamjstewart adamjstewart deleted the packages/py-jupyter-packaging branch October 10, 2023 18:50
RikkiButler20 pushed a commit to RikkiButler20/spack that referenced this pull request Nov 2, 2023
* py-jupyter-packaging: remove duplicate packages

* Allow py-jupyter-packaging to be duplicated in DAG

* Deprecate version of py-jupyterlab that requires py-jupyter-packaging at run-time
RikkiButler20 pushed a commit to RikkiButler20/spack that referenced this pull request Jan 11, 2024
* py-jupyter-packaging: remove duplicate packages

* Allow py-jupyter-packaging to be duplicated in DAG

* Deprecate version of py-jupyterlab that requires py-jupyter-packaging at run-time
RikkiButler20 pushed a commit to RikkiButler20/spack that referenced this pull request Jan 31, 2024
* py-jupyter-packaging: remove duplicate packages

* Allow py-jupyter-packaging to be duplicated in DAG

* Deprecate version of py-jupyterlab that requires py-jupyter-packaging at run-time
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants