Commit 81c46ca7 authored by Sang Ik Lee's avatar Sang Ik Lee Committed by Scott Cyphers

include rc version in NGRAPH_VERSION_SHORT and add NGRAPH_WHEEL_VERSION (#2786)

* include rc version in NGRAPH_VERSION_SHORT

* Create a separate version string for python wheel.
parent adc2111e
......@@ -40,7 +40,8 @@ include(var_functions)
NGRAPH_GET_VERSION_LABEL()
string(REGEX MATCH "([0-9?]+)\\.([0-9?]+)\\.([0-9?]+)" NGRAPH_VERSION_SHORT "${NGRAPH_VERSION_LABEL}")
string(REGEX MATCH "([0-9?]+)\\.([0-9?]+)\\.([0-9?]+)(-rc\\.[0-9?]+)?" NGRAPH_VERSION_SHORT "${NGRAPH_VERSION_LABEL}")
string(REGEX REPLACE "-rc." "rc" NGRAPH_WHEEL_VERSION "${NGRAPH_VERSION_SHORT}")
string(REGEX MATCH "([0-9?]+)\\.([0-9?]+)" NGRAPH_API_VERSION "${NGRAPH_VERSION_LABEL}")
string(REGEX MATCH "[^v](.*)" NGRAPH_VERSION "${NGRAPH_VERSION_LABEL}")
string(REPLACE "." ";" NGRAPH_VERSION_PARTS "${NGRAPH_VERSION_SHORT}")
......@@ -51,6 +52,7 @@ configure_file(VERSION.in VERSION)
message(STATUS "NGRAPH_VERSION ${NGRAPH_VERSION}")
message(STATUS "NGRAPH_VERSION_SHORT ${NGRAPH_VERSION_SHORT}")
message(STATUS "NGRAPH_WHEEL_VERSION ${NGRAPH_WHEEL_VERSION}")
message(STATUS "NGRAPH_API_VERSION ${NGRAPH_API_VERSION}")
set(NGRAPH_INCLUDE_PATH
......
......@@ -20,7 +20,7 @@ set -e
export PYBIND_HEADERS_PATH=@CMAKE_BINARY_DIR@/pybind11
export NGRAPH_CPP_BUILD_PATH=@CMAKE_BINARY_DIR@/python/_install/@CMAKE_INSTALL_PREFIX@/
export NGRAPH_ONNX_IMPORT_ENABLE=@NGRAPH_ONNX_IMPORT_ENABLE@
export NGRAPH_VERSION=@NGRAPH_VERSION_SHORT@
export NGRAPH_VERSION=@NGRAPH_WHEEL_VERSION@
SOURCE_DIR=@CMAKE_SOURCE_DIR@/python
BUILD_DIR=@CMAKE_BINARY_DIR@/python
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment