change version of psycopg2

This commit is contained in:
zhang_xubo
2022-09-17 19:22:58 +08:00
parent 0a478d4298
commit 5bcf192b9b
2 changed files with 20 additions and 4 deletions

View File

@ -18,24 +18,30 @@ yum install python3 python3-devel
3. 下载`openGauss-connector-python-psycopg2`仓库代码,进入到根目录下,执行 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` 目录下。 编译完成后的驱动,在 `output` 目录下。
#### 软件下载 #### 软件下载
社区每日构建,提供三套环境已经编译好的驱动包供使用,下载路径如下: 社区每日构建,提供三套环境已经编译好的驱动包供使用,下载路径如下:
其中 **VERSION** 为当前最新的版本号。
openEuler-aarch64:\ 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: \ 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: \ 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
#### 使用说明 #### 使用说明

View File

@ -57,6 +57,7 @@ function print_help()
echo "Usage: $0 [OPTION] echo "Usage: $0 [OPTION]
-h|--help show help information. -h|--help show help information.
-bd|--serverlib_dir the directory of sever binarylibs. -bd|--serverlib_dir the directory of sever binarylibs.
-v|--version package version number.
" "
} }
@ -96,6 +97,15 @@ while [ $# -gt 0 ]; do
serverlib_dir=$2 serverlib_dir=$2
shift 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 "Internal Error: option processing error: $1" 1>&2
echo "please input right paramtenter, the following command may help you" echo "please input right paramtenter, the following command may help you"