Skip to content

Commit

Permalink
(py-)onnx: new version 1.14.{0,1}, 1.15.0
Browse files Browse the repository at this point in the history
Notes on `onnx`:
- The C++ standard was changed to 14 in 1.15, so no more filter_file is needed. (The C++ standard has since changed to 17 in master.)

Notes on `py-onnx`:
- `py-pybind11` was an unlisted requirement in CMakeLists.txt since 1.3 or so (before earliest spack package).
  • Loading branch information
wdconinc committed Jan 7, 2024
1 parent 6e6f96f commit 8316d75
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
5 changes: 4 additions & 1 deletion var/spack/repos/builtin/packages/onnx/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ class Onnx(CMakePackage):
git = "https://github.com/onnx/onnx.git"

version("master", branch="master")
version("1.15.0", sha256="c757132e018dd0dd171499ef74fca88b74c5430a20781ec53da19eb7f937ef68")
version("1.14.1", sha256="e296f8867951fa6e71417a18f2e550a730550f8829bd35e947b4df5e3e777aa1")
version("1.14.0", sha256="1b02ad523f79d83f9678c749d5a3f63f0bcd0934550d5e0d7b895f9a29320003")
version(
"1.13.1", sha256="090d3e10ec662a98a2a72f1bf053f793efc645824f0d4b779e0ce47468a0890e"
) # py-torch@2:
Expand Down Expand Up @@ -60,7 +63,7 @@ class Onnx(CMakePackage):
depends_on("protobuf")

def patch(self):
if self.spec.satisfies("@1.13 ^[email protected]:"):
if self.spec.satisfies("@1.13:1.14 ^[email protected]:"):
filter_file("CMAKE_CXX_STANDARD 11", "CMAKE_CXX_STANDARD 14", "CMakeLists.txt")

def cmake_args(self):
Expand Down
20 changes: 17 additions & 3 deletions var/spack/repos/builtin/packages/py-onnx/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ class PyOnnx(PythonPackage):
homepage = "https://github.com/onnx/onnx"
pypi = "Onnx/onnx-1.6.0.tar.gz"

version("1.15.0", sha256="b18461a7d38f286618ca2a6e78062a2a9c634ce498e631e708a8041b00094825")
version("1.14.1", sha256="70903afe163643bd71195c78cedcc3f4fa05a2af651fd950ef3acbb15175b2d1")
version("1.14.0", sha256="43b85087c6b919de66872a043c7f4899fe6f840e11ffca7e662b2ce9e4cc2927")
version("1.13.1", sha256="0bdcc25c2c1ce4a8750e4ffbd93ae945442e7fac6e51176f38e366b74a97dfd9")
version("1.13.0", sha256="410b39950367857f97b65093681fe2495a2e23d63777a8aceaf96c56a16d166e")
version("1.12.0", sha256="13b3e77d27523b9dbf4f30dfc9c959455859d5e34e921c44f712d69b8369eff9")
Expand All @@ -28,7 +31,12 @@ class PyOnnx(PythonPackage):
version("1.6.0", sha256="3b88c3fe521151651a0403c4d131cb2e0311bd28b753ef692020a432a81ce345")
version("1.5.0", sha256="1a584a4ef62a6db178c257fffb06a9d8e61b41c0a80bfd8bcd8a253d72c4b0b4")

# pyproject.toml
depends_on("[email protected]:", type=("build", "run"), when="@1.15:")

depends_on("py-setuptools", type="build")
depends_on("py-setuptools@61:", type="build", when="@1.15:")

depends_on("protobuf")
depends_on("py-protobuf+cpp", type=("build", "run"))
# Protobuf version limit is due to removal of SetTotalBytesLimit in
Expand All @@ -46,12 +54,18 @@ class PyOnnx(PythonPackage):
depends_on("[email protected]:3.20.1", type=("build", "run"), when="@1.12.0")
depends_on("[email protected]:3", when="@1.13.0:")
depends_on("[email protected]:3", type=("build", "run"), when="@1.13.0:")

depends_on("py-numpy", type=("build", "run"))
depends_on("[email protected]:", type=("build", "run"), when="@1.8.1:")
depends_on("py-six", type=("build", "run"), when="@:1.8.1")
depends_on("[email protected]:", type=("build", "run"))

# CMakeLists.txt
depends_on("[email protected]:", type="build")
depends_on("py-pytest-runner", type="build")
depends_on("[email protected]:", type=("build", "run"))

# Obsolete dependencies
depends_on("py-six", type=("build", "run"), when="@:1.8.1")
depends_on("[email protected]:", type=("build", "run"), when="@:1.14")
depends_on("py-pytest-runner", type="build", when="@:1.14")

# 'python_out' does not recognize dllexport_decl.
patch("remove_dllexport_decl.patch", when="@:1.6.0")

0 comments on commit 8316d75

Please sign in to comment.