diff --git a/README.md b/README.md index 732607902c8ba9a79f5b21a7fd13f2eb380e836a..f3476263148a42deefcb54f0b2326c6d2b77c623 100644 --- a/README.md +++ b/README.md @@ -18,24 +18,30 @@ yum install python3 python3-devel 3. 下载`openGauss-connector-python-psycopg2`仓库代码,进入到根目录下,执行 ``` -sh build.sh -bd /data/compile/openGauss-server/dest/ # dest为编译openGauss-server编译结果目录 +sh build.sh -bd /data/compile/openGauss-server/dest/ -v 3.0.0 ``` +**说明** \ +-bd: 指定openGauss数据库构建结果目录 \ +-v: 指定构建包的版本号。不指定则默认为3.0.0 + 编译完成后的驱动,在 `output` 目录下。 #### 软件下载 社区每日构建,提供三套环境已经编译好的驱动包供使用,下载路径如下: +其中 **VERSION** 为当前最新的版本号。 + openEuler-aarch64:\ -https://opengauss.obs.cn-south-1.myhuaweicloud.com/latest/arm/openGauss-3.0.0-openEuler-aarch64-Python.tar.gz +https://opengauss.obs.cn-south-1.myhuaweicloud.com/latest/arm/openGauss-**VERSION**-openEuler-aarch64-Python.tar.gz CentOS-x86_64: \ -https://opengauss.obs.cn-south-1.myhuaweicloud.com/latest/x86/openGauss-3.0.0-CentOS-x86_64-Python.tar.gz +https://opengauss.obs.cn-south-1.myhuaweicloud.com/latest/x86/openGauss-**VERSION**-CentOS-x86_64-Python.tar.gz openEuler-x86_64: \ -https://opengauss.obs.cn-south-1.myhuaweicloud.com/latest/x86_openEuler/openGauss-3.0.0-openEuler-x86_64-Python.tar.gz +https://opengauss.obs.cn-south-1.myhuaweicloud.com/latest/x86_openEuler/openGauss-**VERSION**-openEuler-x86_64-Python.tar.gz #### 使用说明 diff --git a/build.sh b/build.sh index 0369513b6e7bba470bab86b403980c3345e4c57d..bec50a94006534d47d540d99fa58b20d33ee431f 100644 --- a/build.sh +++ b/build.sh @@ -57,6 +57,7 @@ function print_help() echo "Usage: $0 [OPTION] -h|--help show help information. -bd|--serverlib_dir the directory of sever binarylibs. + -v|--version package version number. " } @@ -96,6 +97,15 @@ while [ $# -gt 0 ]; do serverlib_dir=$2 shift 2 ;; + -v|--version) + if [ "$2" != "" ]; then + echo "Package openGauss python driver version is : $2" + version_number=$2 + else + echo "No version number was specified. Use the default $version_number" + fi + shift 2 + ;; *) echo "Internal Error: option processing error: $1" 1>&2 echo "please input right paramtenter, the following command may help you"