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
27 changes: 15 additions & 12 deletions repos/spack_repo/builtin/packages/py_cuda_core/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,26 @@ class PyCudaCore(PythonPackage):

homepage = "https://github.com/NVIDIA/cuda-python"
git = "https://github.com/NVIDIA/cuda-python"
url = "https://github.com/NVIDIA/cuda-python/releases/download/v12.9.0/cuda-python-v12.9.0.tar.gz"
url = "https://github.com/NVIDIA/cuda-python/archive/refs/tags/cuda-core-v0.5.1.tar.gz"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is also tricky, since it changes what the package installs. Though it does move in the direction of being more sensible... IMHO.


version("12.9.0", sha256="1fa57a9fad278256cbb3b6cf347d2b258a7f83bba2759257e54c9fabd0b07ce1")
version("12.8.0", sha256="6cc8db1e65a1f995e289b64f9b9bff4362321d36ecf9b54eb192d0781475fbca")
version("11.8.7", sha256="613ec6d0cde3db4d48074010ed6015ff60462f14c5fa7d8fe82fe7a7ecd5d1ac")
version("0.5.1", sha256="c58f780e6b996bda0d2e64d0e21afa9d1193739ba290b1ec1323822551a589d5")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is tricky. Someone who has v12 installed will never upgrade to v0.5.1.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yes, maybe we could keep old versions, specifying their different url and adding the parameter deprecated=True in the version directive


depends_on("cuda@12.9", when="@12.9.0")
depends_on("cuda@12.8", when="@12.8.0")
depends_on("cuda@11.8", when="@11.8.7")
depends_on("python@3.9:", type=("build", "run"))
depends_on("py-cython", type="build")
license("Apache-2.0")

depends_on("py-cython@3.2:3.2", type="build")
depends_on("py-setuptools@77.0.0:", type="build")
depends_on("py-pyclibrary", type=("build", "run"))
depends_on("python@3.10:", type=("build", "run"))
depends_on("py-pywin32", when="platform=windows", type=("build", "run"))
depends_on("py-setuptools", type="build")
depends_on("py-setuptools@77.0.0:", when="@12.9.0", type="build")
depends_on("py-cuda-bindings", type=("build", "run"))
depends_on("py-numpy", type="run")

build_directory = "cuda_core"

def setup_build_environment(self, env):
env.append_path("LIBRARY_PATH", self.spec["cuda"].prefix.lib64)
bindings_version = str(self.spec["py-cuda-bindings"].version)
cuda_major = bindings_version.split(".")[0]
cuda_prefix = self.spec["cuda"].prefix

env.set("CUDA_CORE_BUILD_MAJOR", cuda_major)
env.append_path("LIBRARY_PATH", cuda_prefix.lib64)
Loading