You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by si...@apache.org on 2018/10/04 09:21:03 UTC
[bookkeeper] branch master updated: [TABLE SERVICE] [CLIENT]
provide scripts for uploading python clients to pypi
This is an automated email from the ASF dual-hosted git repository.
sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/master by this push:
new ece38f5 [TABLE SERVICE] [CLIENT] provide scripts for uploading python clients to pypi
ece38f5 is described below
commit ece38f5994fd30d1f132e6f45ae15a406cc926bf
Author: Sijie Guo <gu...@gmail.com>
AuthorDate: Thu Oct 4 02:20:58 2018 -0700
[TABLE SERVICE] [CLIENT] provide scripts for uploading python clients to pypi
Descriptions of the changes in this PR:
*Motivation*
make the python client available for usage
*Changes*
- update README and setup.py
- set the client version to `4.9.0-alpha-0`
- scripts to build python client and upload it to pypi
*Result*
https://pypi.org/project/apache-bookkeeper-client/4.9.0a0/
Author: Sijie Guo <si...@apache.org>
Reviewers: Enrico Olivelli <eo...@gmail.com>
This closes #1734 from sijie/upload_python_client
---
pom.xml | 1 +
stream/clients/python/.gitignore | 3 +++
stream/clients/python/README.md | 4 ----
stream/clients/python/README.rst | 4 ++++
stream/clients/python/scripts/publish.sh | 30 ++++++++++++++++++++++++
stream/clients/python/scripts/publish_staging.sh | 30 ++++++++++++++++++++++++
stream/clients/python/setup.py | 8 +++----
7 files changed, 72 insertions(+), 8 deletions(-)
diff --git a/pom.xml b/pom.xml
index 418e9a4..ecac42a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -854,6 +854,7 @@
<!-- Project files -->
<exclude>**/README.md</exclude>
+ <exclude>**/README.rst</exclude>
<exclude>**/apidocs/*</exclude>
<exclude>**/src/main/resources/deps/**</exclude>
<exclude>**/META-INF/**</exclude>
diff --git a/stream/clients/python/.gitignore b/stream/clients/python/.gitignore
index a520e65..5d2d92b 100644
--- a/stream/clients/python/.gitignore
+++ b/stream/clients/python/.gitignore
@@ -20,3 +20,6 @@ bookkeeper.egg-info/
# pip
pip-selfcheck.json
+
+# egg-info
+**egg-info/
diff --git a/stream/clients/python/README.md b/stream/clients/python/README.md
deleted file mode 100644
index df1b7ef..0000000
--- a/stream/clients/python/README.md
+++ /dev/null
@@ -1,4 +0,0 @@
-Python Client for Apache BookKeeper
-===================================
-
-|pypi| |versions|
diff --git a/stream/clients/python/README.rst b/stream/clients/python/README.rst
new file mode 100644
index 0000000..65afe63
--- /dev/null
+++ b/stream/clients/python/README.rst
@@ -0,0 +1,4 @@
+Python Client for Apache BookKeeper
+===================================
+
+Apache BookKeeper is a scalable, fault tolerant and low latency storage service optimized for append-only workloads.
diff --git a/stream/clients/python/scripts/publish.sh b/stream/clients/python/scripts/publish.sh
new file mode 100755
index 0000000..caa2a3b
--- /dev/null
+++ b/stream/clients/python/scripts/publish.sh
@@ -0,0 +1,30 @@
+#!/usr/bin/env bash
+#
+#/**
+# * Licensed to the Apache Software Foundation (ASF) under one
+# * or more contributor license agreements. See the NOTICE file
+# * distributed with this work for additional information
+# * regarding copyright ownership. The ASF licenses this file
+# * to you under the Apache License, Version 2.0 (the
+# * "License"); you may not use this file except in compliance
+# * with the License. You may obtain a copy of the License at
+# *
+# * http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+# */
+
+# Upload python client to pypi staging
+
+BINDIR=`dirname "$0"`
+BK_HOME=`cd ${BINDIR}/..;pwd`
+
+python -m pip install --user --upgrade setuptools wheel twine
+
+rm ${BK_HOME}/dist/*
+python setup.py sdist bdist_wheel
+twine upload dist/*
diff --git a/stream/clients/python/scripts/publish_staging.sh b/stream/clients/python/scripts/publish_staging.sh
new file mode 100755
index 0000000..363a768
--- /dev/null
+++ b/stream/clients/python/scripts/publish_staging.sh
@@ -0,0 +1,30 @@
+#!/usr/bin/env bash
+#
+#/**
+# * Licensed to the Apache Software Foundation (ASF) under one
+# * or more contributor license agreements. See the NOTICE file
+# * distributed with this work for additional information
+# * regarding copyright ownership. The ASF licenses this file
+# * to you under the Apache License, Version 2.0 (the
+# * "License"); you may not use this file except in compliance
+# * with the License. You may obtain a copy of the License at
+# *
+# * http://www.apache.org/licenses/LICENSE-2.0
+# *
+# * Unless required by applicable law or agreed to in writing, software
+# * distributed under the License is distributed on an "AS IS" BASIS,
+# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# * See the License for the specific language governing permissions and
+# * limitations under the License.
+# */
+
+# Upload python client to pypi staging
+
+BINDIR=`dirname "$0"`
+BK_HOME=`cd ${BINDIR}/..;pwd`
+
+python -m pip install --user --upgrade setuptools wheel twine
+
+rm ${BK_HOME}/dist/*
+python setup.py sdist bdist_wheel
+twine upload --repository-url https://test.pypi.org/legacy/ dist/*
diff --git a/stream/clients/python/setup.py b/stream/clients/python/setup.py
index 49afd7a..74a8b0c 100644
--- a/stream/clients/python/setup.py
+++ b/stream/clients/python/setup.py
@@ -17,9 +17,9 @@ import setuptools
# Package metadata.
-name = 'bookkeeper'
+name = 'apache-bookkeeper-client'
description = 'Apache BookKeeper client library'
-version = '4.9.0'
+version = '4.9.0-alpha-0'
# Should be one of:
# 'Development Status :: 3 - Alpha'
# 'Development Status :: 4 - Beta'
@@ -42,7 +42,7 @@ extras = {
package_root = os.path.abspath(os.path.dirname(__file__))
-readme_filename = os.path.join(package_root, 'README.md')
+readme_filename = os.path.join(package_root, 'README.rst')
with io.open(readme_filename, encoding='utf-8') as readme_file:
readme = readme_file.read()
@@ -67,7 +67,7 @@ setuptools.setup(
classifiers=[
release_status,
'Intended Audience :: Developers',
- 'License :: Apache Software License',
+ 'License :: OSI Approved :: Apache Software License',
'Programming Language :: Python',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',