Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 51 additions & 10 deletions repos/spack_repo/builtin/packages/py_thinc/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,61 @@ class PyThinc(PythonPackage):

license("MIT")

version("8.3.10", sha256="5a75109f4ee1c968fc055ce651a17cb44b23b000d9e95f04a4d047ab3cb3e34e")
version("8.1.10", sha256="6c4a48d7da07e044e84a68cbb9b22f32f8490995a2bab0bfc60e412d14afb991")
version("7.4.1", sha256="0139fa84dc9b8d88af15e648fc4ae13d899b8b5e49cb26a8f4a0604ee9ad8a9e")
version("7.4.0", sha256="523e9be1bfaa3ed1d03d406ce451b6b4793a9719d5b83d2ea6b3398b96bc58b8")

depends_on("c", type="build") # generated
depends_on("cxx", type="build") # generated

# @8.1.10 minimum python version is 3.6. Set minimum version to 3.7 due to spack missing
# py-contextvars and 3.6 being deprecated in spack.
depends_on("python@3.7:", type=("build", "run"), when="@8.1.10")
depends_on("python@3.10:3.14", type=("build", "run"), when="@8.3.10:")

depends_on("py-setuptools", type="build")
depends_on("py-murmurhash@0.28:1.0", type=("build", "run"))
depends_on("py-cymem@2.0.2:2.0", type=("build", "run"))
depends_on("py-preshed@1.0.1:3.0", type=("build", "run"))
depends_on("py-blis@0.4.0:0.4", type=("build", "run"))
depends_on("py-wasabi@0.0.9:1.0", type=("build", "run"))
depends_on("py-srsly@0.0.6:1.0", type=("build", "run"))
depends_on("py-catalogue@0.0.7:1.0", type=("build", "run"))
depends_on("py-numpy@1.7:", type=("build", "run"))
depends_on("py-plac@0.9.6:1.1", type=("build", "run"))
depends_on("py-tqdm@4.10:4", type=("build", "run"))

depends_on("py-cython@0.25:2", type="build", when="@8.1.10")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
depends_on("py-cython@0.25:2", type="build", when="@8.1.10")
depends_on("py-cython@0.25:2", type="build", when="@8.1.10:")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change would seem to conflict with line 35. Can you explain what is intended here?

depends_on("py-cython@3", type="build", when="@8.3.10:")

with default_args(type=("build", "run")):
depends_on("py-blis@0.4.0:0.4", when="@:7.4.1")
depends_on("py-blis@0.7.8:0.7", when="@8.1.10")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
depends_on("py-blis@0.7.8:0.7", when="@8.1.10")
depends_on("py-blis@0.7.8:0.7", when="@8.1.10:")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change would seem to conflict with line 40. Can you explain what is intended here?

depends_on("py-blis@1.3", when="@8.3.10:")

depends_on("py-murmurhash@0.28:1.0", when="@:7.4.1")
depends_on("py-murmurhash@1.0.2:1.0", when="@8.1.10:")

depends_on("py-cymem@2.0.2:2.0")

depends_on("py-preshed@1.0.1:3.0", when="@:7.4.1")
depends_on("py-preshed@3.0.2:3.0", when="@8.1.10:")

depends_on("py-wasabi@0.0.9:1.0", when="@:7.4.1")
depends_on("py-wasabi@0.8.1:1.1", when="@8.1.10:")

depends_on("py-srsly@0.0.6:1.0", when="@:7.4.1")
depends_on("py-srsly@2.4:2", when="@8.1.10:")

depends_on("py-catalogue@0.0.7:1.0", when="@:7.4.1")
depends_on("py-catalogue@2.0.4:2.0", when="@8.1.10:")

depends_on("py-confection@0.0.1:0", when="@8.1.10:")

depends_on("py-numpy@1.7:", when="@:7.4.1")
depends_on("py-numpy@1.15:", when="@8.1.10")
depends_on("py-numpy@2:", when="@8.3.10:")

depends_on("py-pydantic@1.7.4:1.7,1.9:1.10", when="@8.1.10")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
depends_on("py-pydantic@1.7.4:1.7,1.9:1.10", when="@8.1.10")
depends_on("py-pydantic@1.7.4:1.7,1.9:1.10", when="@8.1.10:")

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This change would seem to conflict with line 66. Can you explain what is intended here?

Copy link
Contributor

Choose a reason for hiding this comment

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

There isn't a problem with overlap. The concretizer handles it.

What adding the colon allows is it ensures the dependency applies should someone decide (someday) to add a patch release between it and the next minor release.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

AFAIK that's only true if the dependency version ranges don't have an upper bound. Here, the concretizer would have to find a version of py-pydantic that is both <= 1.10 and of major version 2; an impossible task.

Copy link
Contributor

Choose a reason for hiding this comment

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

I thought your question was why I suggested appending the colon to the when condition. If someone were to add the version 8.1.12 then, without the colon or any other changes here, this package would not have a dependency on py-pydantic. In other words, with the colon, there would not be a need to make any changes to the py-pydantic dependency.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe I could do something like @8.1.10:8.1 but I would not feel comfortable making an intentional declaration like that without going through all published versions within that range and confirming it's accurate. It very quickly can get to the point where I may as well add every version (at least the versions between the oldest and newest version() directives) published on pypi since I'd be doing that work anyway. At the end of the day, IMHO it's the responsibility of the person who would add version("8.1.12") to make sure that the depends_on() directives are accurate for that version. And if those dependencies get missed, that's the value of having peer checkers.

depends_on("py-pydantic@2", when="@8.3.10:")

depends_on("py-packaging@20:", when="@8.1.10:")

# depends_on("py-dataclasses@0.6:0", when="@8.1.10:^python@:3.6")
depends_on("py-typing-extensions@3.7.4.1:4.4", when="@8.1.10:^python@:3.7")
# depends_on("py-contextvars@2.4:2", when="@8.1.10:^python@3.6")

# Historical
depends_on("py-plac@0.9.6:1.1", when="@:7.4.1")
depends_on("py-tqdm@4.10:4", when="@:7.4.1")
Loading