py-onnx: remove_dllexport_decl. (#15648)

This commit is contained in:
Tomoki, Karatsu 2020-03-24 17:56:39 +09:00 committed by GitHub
parent 1b4de7813a
commit dfe4e980ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View File

@ -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')

View File

@ -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)