sijie closed pull request #1734: [table service][client] provide scripts for
uploading python clients to pypi
URL: https://github.com/apache/bookkeeper/pull/1734
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/pom.xml b/pom.xml
index 418e9a4f5d..ecac42afce 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 a520e657a9..5d2d92bef5 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 df1b7efd24..0000000000
--- 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 0000000000..65afe63d77
--- /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 0000000000..caa2a3b5b4
--- /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 0000000000..363a768e07
--- /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 49afd7a424..74a8b0ca07 100644
--- a/stream/clients/python/setup.py
+++ b/stream/clients/python/setup.py
@@ -17,9 +17,9 @@
# 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 @@
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 @@
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',
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services