Skip to content

Commit 03400e7

Browse files
authored
[tool] Shell tool for building source distribution package (#32)
1 parent f4c684b commit 03400e7

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@ We provide script to check codes.
3131
./dev/lint-python.sh -h # run this to see more usages
3232
```
3333

34+
## Build
35+
36+
We provide a script to build source distribution package.
37+
38+
```shell
39+
./dev/build-source-distribution-package.sh
40+
```
41+
42+
The package is under `dist/`.
43+
3444
# Usage
3545

3646
See Apache Paimon Python API [Doc](https://paimon.apache.org/docs/master/program-api/python-api/).
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
#
2+
# Licensed to the Apache Software Foundation (ASF) under one or more
3+
# contributor license agreements. See the NOTICE file distributed with
4+
# this work for additional information regarding copyright ownership.
5+
# The ASF licenses this file to You under the Apache License, Version 2.0
6+
# (the "License"); you may not use this file except in compliance with
7+
# the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
#
17+
18+
CURR_DIR=`pwd`
19+
BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
20+
PROJECT_ROOT="${BASE_DIR}/../"
21+
22+
# prepare bridge jar
23+
24+
DEPS_DIR=${PROJECT_ROOT}/deps/jars
25+
rm -rf ${DEPS_DIR}
26+
mkdir -p ${DEPS_DIR}
27+
28+
cd ${PROJECT_ROOT}/paimon-python-java-bridge
29+
30+
# get bridge jar version
31+
JAR_VERSION=$(sed -n 's/.*<version>\(.*\)<\/version>.*/\1/p' pom.xml | head -n 1)
32+
33+
mvn clean install -DskipTests
34+
cp "target/paimon-python-java-bridge-${JAR_VERSION}.jar" ${DEPS_DIR}
35+
36+
cd ${CURR_DIR}
37+
38+
# build source distribution package
39+
40+
python setup.py sdist
41+
42+
rm -rf ${DEPS_DIR}
43+
cd ${CURR_DIR}

0 commit comments

Comments
 (0)