Extract DevelopmentStatus as a constant to scripts/constants.py

This commit is contained in:
mbohlool 2017-01-10 10:43:14 -08:00
parent 420d491bda
commit 58aa16506e
3 changed files with 9 additions and 1 deletions

View File

@ -28,6 +28,10 @@ CLIENT_VERSION = "1.0.0-snapshot"
# Name of the release package
PACKAGE_NAME = "kubernetes"
# Stage of development, mainly used in setup.py's classifiers.
DEVELOPMENT_STATUS = "3 - Alpha"
# If called directly, return the constant value given
# its name. Useful in bash scripts.
if __name__ == '__main__':

View File

@ -30,6 +30,7 @@ SCRIPT_ROOT=$(dirname "${BASH_SOURCE}")
CLIENT_ROOT="${SCRIPT_ROOT}/../kubernetes"
CLIENT_VERSION=$(python "${SCRIPT_ROOT}/constants.py" CLIENT_VERSION)
PACKAGE_NAME=$(python "${SCRIPT_ROOT}/constants.py" PACKAGE_NAME)
DEVELOPMENT_STATUS=$(python "${SCRIPT_ROOT}/constants.py" DEVELOPMENT_STATUS)
pushd "${SCRIPT_ROOT}" > /dev/null
SCRIPT_ROOT=`pwd`
@ -59,4 +60,6 @@ rm "${CLIENT_ROOT}/LICENSE"
echo "--- updating version information..."
sed -i'' "s/^CLIENT_VERSION = .*/CLIENT_VERSION = \\\"${CLIENT_VERSION}\\\"/" "${SCRIPT_ROOT}/../setup.py"
sed -i'' "s/^PACKAGE_NAME = .*/PACKAGE_NAME = \\\"${PACKAGE_NAME}\\\"/" "${SCRIPT_ROOT}/../setup.py"
sed -i'' "s/^DEVELOPMENT_STATUS = .*/DEVELOPMENT_STATUS = \\\"${DEVELOPMENT_STATUS}\\\"/" "${SCRIPT_ROOT}/../setup.py"
echo "---Done."

View File

@ -18,6 +18,7 @@ from setuptools import find_packages, setup
# by scripts/update-client.sh.
CLIENT_VERSION = "1.0.0-snapshot"
PACKAGE_NAME = "kubernetes"
DEVELOPMENT_STATUS = "snapshot"
# To install the library, run the following
#
@ -53,7 +54,7 @@ setup(
Python client for kubernetes http://kubernetes.io/
""",
classifiers=[
"Development Status :: 4 - Alpha",
"Development Status :: %s" % DEVELOPMENT_STATUS,
"Environment :: Kubernetes",
"Topic :: Utilities",
"Intended Audience :: Developers",