You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aurora.apache.org by ke...@apache.org on 2014/01/17 03:11:48 UTC

git commit: Script to create Python sdists.

Updated Branches:
  refs/heads/master 915977e49 -> 5a4b9df49


Script to create Python sdists.

Testing Done:
./build-support/release/make-python-sdists

Bugs closed: AURORA-44

Reviewed at https://reviews.apache.org/r/16985/


Project: http://git-wip-us.apache.org/repos/asf/incubator-aurora/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-aurora/commit/5a4b9df4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-aurora/tree/5a4b9df4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-aurora/diff/5a4b9df4

Branch: refs/heads/master
Commit: 5a4b9df4987ed8cfacd9ab7a6dfa5243ab102f2d
Parents: 915977e
Author: Kevin Sweeney <ke...@apache.org>
Authored: Thu Jan 16 18:00:35 2014 -0800
Committer: Kevin Sweeney <ke...@apache.org>
Committed: Thu Jan 16 18:00:35 2014 -0800

----------------------------------------------------------------------
 .gitignore                               |  1 +
 build-support/release/make-python-sdists | 43 +++++++++++++++++++++++++++
 2 files changed, 44 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/5a4b9df4/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index bf8c4e5..25114b9 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,6 +10,7 @@
 build/
 build-support/rbtools/
 build-support/virtualenv-*
+build-support/make-python-sdists.virtualenv
 dist/
 gradle-app.setting
 out/

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/5a4b9df4/build-support/release/make-python-sdists
----------------------------------------------------------------------
diff --git a/build-support/release/make-python-sdists b/build-support/release/make-python-sdists
new file mode 100755
index 0000000..b2314d7
--- /dev/null
+++ b/build-support/release/make-python-sdists
@@ -0,0 +1,43 @@
+#!/bin/bash
+# make-python-sdists: Generate sdists for Aurora Python code for use with pip or upload to PyPI.
+# Usage:
+#   ./build-support/make-python-sdists
+#
+# Examples:
+#   Install the aurora client in a virtualenv:
+#     ./build-support/virtualenv ~/aurora-virtualenv
+#     source ~/aurora-virtualenv/bin/activate
+#     pip install -f dist apache.aurora.client
+#     aurora --help
+#     aurora_admin --help
+set -o errexit
+
+TARGETS=(
+  src/main/python/apache/aurora/client:client-packaged
+  src/main/python/apache/aurora/common
+  src/main/python/apache/aurora/config:config-packaged
+  src/main/python/apache/aurora/executor:executor-packaged
+  src/main/python/apache/thermos
+  src/main/python/apache/thermos/common
+  src/main/python/apache/thermos/config
+  src/main/python/apache/thermos/core
+  src/main/python/apache/thermos/monitoring
+  src/main/python/apache/thermos/observer
+  src/main/thrift/org/apache/aurora/gen:py-thrift-packaged
+  src/main/thrift/org/apache/thermos:py-thrift
+)
+
+cd "`git rev-parse --show-toplevel`"
+# Run in a virtualenv so that we use a consistent version of setuptools to generate the sdist.
+# Without this indirection pants will use the system setuptools, which on Ubuntu 12.04 is old,
+# buggy, and produces a broken apache.thermos.observer.
+# TODO(ksweeney): Remove this indirection when pants supports this natively.
+if [[ ! -f build-support/make-python-sdists.virtualenv/BOOTSTRAPPED ]]; then
+  ./build-support/virtualenv build-support/make-python-sdists.virtualenv
+  touch build-support/make-python-sdists.virtualenv/BOOTSTRAPPED
+fi
+source build-support/make-python-sdists.virtualenv/bin/activate
+
+for t in "${TARGETS[@]}"; do
+  ./pants setup_py $t
+done