diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/py-onnx/package.py | 3 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/py-onnx/remove_dllexport_decl.patch | 11 |
2 files changed, 14 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/py-onnx/package.py b/var/spack/repos/builtin/packages/py-onnx/package.py index fd6d6b0b6d..c6401d8b00 100644 --- a/var/spack/repos/builtin/packages/py-onnx/package.py +++ b/var/spack/repos/builtin/packages/py-onnx/package.py @@ -28,3 +28,6 @@ class PyOnnx(PythonPackage): depends_on('py-six', type=('build', 'run')) depends_on('py-typing@3.6.4:', type=('build', 'run')) depends_on('py-typing-extensions@3.6.4:', type=('build', 'run')) + + # 'python_out' does not recognize dllexport_decl. + patch('remove_dllexport_decl.patch', when='@:1.6.0') diff --git a/var/spack/repos/builtin/packages/py-onnx/remove_dllexport_decl.patch b/var/spack/repos/builtin/packages/py-onnx/remove_dllexport_decl.patch new file mode 100644 index 0000000000..ede1fe66f2 --- /dev/null +++ b/var/spack/repos/builtin/packages/py-onnx/remove_dllexport_decl.patch @@ -0,0 +1,11 @@ +--- spack-src/CMakeLists.txt.org 2020-03-24 14:01:58.856142450 +0900 ++++ spack-src/CMakeLists.txt 2020-03-24 14:01:05.715872685 +0900 +@@ -204,7 +204,7 @@ + ${ONNX_DLLEXPORT_STR}${CMAKE_CURRENT_BINARY_DIR}) + if(BUILD_ONNX_PYTHON) + list(APPEND PROTOC_ARGS --python_out +- ${ONNX_DLLEXPORT_STR}${CMAKE_CURRENT_BINARY_DIR}) ++ ${CMAKE_CURRENT_BINARY_DIR}) + if(ONNX_GEN_PB_TYPE_STUBS) + # Haven't figured out how to generate mypy stubs on Windows yet + if(NOT WIN32) |