Skip to content

Commit

Permalink
Merge pull request #15 from ShannonDing/refactor
Browse files Browse the repository at this point in the history
Update SDK version to 1.2.0 and refactor boost python build script
  • Loading branch information
vongosling authored Dec 7, 2018
2 parents 15dbee7 + ee3dc07 commit 5128e99
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 28 deletions.
46 changes: 25 additions & 21 deletions doc/Introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
## RocketMQ Client Python

### 1. Python Version
* Python 2.7.x
* python 2.7.x


### 2. Dependency

* [librocketmq](https://github.com/apache/rocketmq-client-cpp)
* python-devel 2.7.x
* boost-python 1.53.0+
* boost-python 1.58.0

### 3. Build and Install
#### Linux Platform
Expand All @@ -22,27 +22,31 @@
* Install dependency:
1. python-devel
```
sudo yum install python-devel
```
2. boost-python
```
sudo yum install boost-python
sudo yum install boost-python-devel
```
3. [librocketmq](https://github.com/apache/rocketmq-client-cpp), choose one method below:
```
sudo yum install python-devel
```
2. zlib-devel
```
sudo yum install zlib-devel
```
3. boost-python
```
sudo sh install_boostpython.sh
```
4. [librocketmq](https://github.com/apache/rocketmq-client-cpp), choose one method below:
- make and install the RocketMQ library manually from [here](https://github.com/apache/rocketmq-client-cpp)
- make and install the RocketMQ library manually from [rocketmq-client-cpp](https://github.com/apache/rocketmq-client-cpp)
- quick install
```
mkdir rocketmqlib
cd rocketmqlib
wget https://opensource-rocketmq-client.oss-cn-hangzhou.aliyuncs.com/cpp-client/linux/1.0.2/RHEL7.x/librocketmq.tar.gz
tar -xzf librocketmq.tar.gz
sudo cp librocketmq.so librocketmq.a /usr/local/lib/
sudo cp -r rocketmq /usr/local/include/
```
- quick install
```
mkdir rocketmqlib
cd rocketmqlib
wget https://opensource-rocketmq-client.oss-cn-hangzhou.aliyuncs.com/cpp-client/linux/1.0.2/RHEL7.x/librocketmq.tar.gz
tar -xzf librocketmq.tar.gz
sudo cp librocketmq.so librocketmq.a /usr/local/lib/
sudo cp -r rocketmq /usr/local/include/
```
* Make and install module manually
Expand Down
14 changes: 9 additions & 5 deletions install_boostpython.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,17 @@ if [ $? -ne 0 ];then
exit 1
fi
echo "Install boost static library...."
sudo ./bjam cflags="-fPIC" cxxflags="-fPIC -Wno-unused-local-typedefs -Wno-strict-aliasing" link=static \
--with-python \
sudo ./b2 cflags="-fPIC" cxxflags="-fPIC -Wno-unused-local-typedefs -Wno-strict-aliasing" link=static \
runtime-link=static --with-python \
-a install
if [ $? -ne 0 ];then
exit 1
fi
echo "Install boost dynamic library....."
sudo ./bjam cflags="-fPIC" cxxflags="-fPIC -Wno-unused-local-typedefs -Wno-strict-aliasing" link=shared \
--with-python
-a install
sudo ./b2 cflags="-fPIC" cxxflags="-fPIC -Wno-unused-local-typedefs -Wno-strict-aliasing" link=shared \
runtime-link=shared --with-python \
-a install
if [ $? -ne 0 ];then
exit 1
fi
echo "Finish build boost library."
4 changes: 2 additions & 2 deletions src/PythonWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ typedef struct _PyMessageExt_ {
CMessageExt *pMessageExt;
} PyMessageExt;

#define PYTHON_CLIENT_VERSION "1.0.0"
#define PYCLI_BUILD_DATE "16-10-2018"
#define PYTHON_CLIENT_VERSION "1.2.0"
#define PYCLI_BUILD_DATE "04-12-2018"

#ifdef __cplusplus
extern "C" {
Expand Down

0 comments on commit 5128e99

Please sign in to comment.