aurora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wick...@apache.org
Subject git commit: Migrate to pantsbuild pants
Date Tue, 17 Jun 2014 21:26:45 GMT
Repository: incubator-aurora
Updated Branches:
  refs/heads/master 30a410921 -> 2983fe25d


Migrate to pantsbuild pants

To correct some 3rdparty-version-collisions, we're migrating onto pants
build's pants.

Testing Done:
On OS X 10.9: ./pants ./src/test/python:all

Bugs closed: AURORA-529

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


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

Branch: refs/heads/master
Commit: 2983fe25d68693f2f737ccd448b8ef349cb00ac2
Parents: 30a4109
Author: Joe Smith <yasumoto7@gmail.com>
Authored: Tue Jun 17 14:24:20 2014 -0700
Committer: Brian Wickman <wickman@apache.org>
Committed: Tue Jun 17 14:24:20 2014 -0700

----------------------------------------------------------------------
 3rdparty/python/BUILD                       | 94 +++++++++++++-----------
 BUILD                                       |  6 +-
 pants                                       | 11 ++-
 src/main/python/apache/aurora/admin/BUILD   |  4 +-
 src/main/thrift/org/apache/aurora/gen/BUILD |  3 +
 5 files changed, 66 insertions(+), 52 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/2983fe25/3rdparty/python/BUILD
----------------------------------------------------------------------
diff --git a/3rdparty/python/BUILD b/3rdparty/python/BUILD
index c9f63cf..641d610 100644
--- a/3rdparty/python/BUILD
+++ b/3rdparty/python/BUILD
@@ -12,48 +12,56 @@
 # limitations under the License.
 #
 
+def make_link(name, version, requirement=None):
+  python_requirement_library(
+    name = name,
+    requirements = [
+      python_requirement('%s==%s' % (name, version) if requirement is None else requirement)
+    ]
+  )
+
+python_requirement_library(
+  name = 'cherrypy',
+  requirements = [
+    python_requirement('cherrypy==3.2.2', repository='http://download.cherrypy.org/cherrypy/3.2.2/')
+  ]
+)
+
 COMMONS_VERSION = '0.3.0'
 
-python_requirement('argparse==1.2.1')
-python_requirement('bottle==0.11.6')
-# As of twitter.pants==0.0.23, we no longer pull in dependencies transitively from
-# pypi (the equivalent of --allow-external in pip.)  We must specify explicitly
-# the repository link for anything whose distribution is not available directly from
-# repos specified in pants.ini.
-python_requirement(
-    'cherrypy==3.2.2',
-    repository='http://download.cherrypy.org/cherrypy/3.2.2/')
-python_requirement('Flask==0.9')
-python_requirement('mako==0.4.0')
-python_requirement('mesos==0.18.0')
-python_requirement('mock==1.0.1')
-python_requirement('mox==0.5.3')
-python_requirement('psutil==1.1.2')
-python_requirement('pystachio==0.7.2')
-python_requirement('pyyaml==3.10')
-python_requirement('requests==2.3.0')
-python_requirement('thrift==0.9.1')
-python_requirement('twitter.common.app==%s' % COMMONS_VERSION)
-python_requirement('twitter.common.collections==%s' % COMMONS_VERSION)
-python_requirement('twitter.common.concurrent==%s' % COMMONS_VERSION)
-python_requirement('twitter.common.config==%s' % COMMONS_VERSION)
-python_requirement('twitter.common.confluence==%s' % COMMONS_VERSION)
-python_requirement('twitter.common.contextutil==%s' % COMMONS_VERSION)
-python_requirement('twitter.common.decorators==%s' % COMMONS_VERSION)
-python_requirement('twitter.common.dirutil==%s' % COMMONS_VERSION)
-python_requirement('twitter.common.exceptions==%s' % COMMONS_VERSION)
-python_requirement('twitter.common.http==%s' % COMMONS_VERSION)
-python_requirement('twitter.common.lang==%s' % COMMONS_VERSION)
-python_requirement('twitter.common.log==%s' % COMMONS_VERSION)
-python_requirement('twitter.common.metrics==%s' % COMMONS_VERSION)
-python_requirement('twitter.common.options==%s' % COMMONS_VERSION)
-python_requirement('twitter.common.process==%s' % COMMONS_VERSION)
-python_requirement('twitter.common.python==0.5.4')
-python_requirement('twitter.common.quantity==%s' % COMMONS_VERSION)
-python_requirement('twitter.common.recordio==%s' % COMMONS_VERSION)
-python_requirement('twitter.common.rpc==%s' % COMMONS_VERSION)
-python_requirement('twitter.common.string==%s' % COMMONS_VERSION)
-python_requirement('twitter.common.testing==%s' % COMMONS_VERSION)
-python_requirement('twitter.common.util==%s' % COMMONS_VERSION)
-python_requirement('twitter.common.zookeeper==%s' % COMMONS_VERSION)
-python_requirement('watchdog==0.7.0')
+make_link('argparse', '1.2.1')
+make_link('bottle', '0.11.6')
+make_link('Flask', '0.9')
+make_link('mako', '0.4.0')
+make_link('mesos', '0.18.0')
+make_link('mock', '1.0.1')
+make_link('mox', '0.5.3')
+make_link('psutil', '1.1.2')
+make_link('pystachio', '0.7.2')
+make_link('pyyaml', '3.10')
+make_link('requests', '2.3.0')
+make_link('thrift', '0.9.1')
+make_link('twitter.common.app', '%s' % COMMONS_VERSION)
+make_link('twitter.common.collections', '%s' % COMMONS_VERSION)
+make_link('twitter.common.concurrent', '%s' % COMMONS_VERSION)
+make_link('twitter.common.config', '%s' % COMMONS_VERSION)
+make_link('twitter.common.confluence', '%s' % COMMONS_VERSION)
+make_link('twitter.common.contextutil', '%s' % COMMONS_VERSION)
+make_link('twitter.common.decorators', '%s' % COMMONS_VERSION)
+make_link('twitter.common.dirutil', '%s' % COMMONS_VERSION)
+make_link('twitter.common.exceptions', '%s' % COMMONS_VERSION)
+make_link('twitter.common.http', '%s' % COMMONS_VERSION)
+make_link('twitter.common.lang', '%s' % COMMONS_VERSION)
+make_link('twitter.common.log', '%s' % COMMONS_VERSION)
+make_link('twitter.common.metrics', '%s' % COMMONS_VERSION)
+make_link('twitter.common.options', '%s' % COMMONS_VERSION)
+make_link('twitter.common.process', '%s' % COMMONS_VERSION)
+make_link('twitter.common.python', '0.5.4')
+make_link('twitter.common.quantity', '%s' % COMMONS_VERSION)
+make_link('twitter.common.recordio', '%s' % COMMONS_VERSION)
+make_link('twitter.common.rpc', '%s' % COMMONS_VERSION)
+make_link('twitter.common.string', '%s' % COMMONS_VERSION)
+make_link('twitter.common.testing', '%s' % COMMONS_VERSION)
+make_link('twitter.common.util', '%s' % COMMONS_VERSION)
+make_link('twitter.common.zookeeper', '%s' % COMMONS_VERSION)
+make_link('watchdog', '0.7.0')

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/2983fe25/BUILD
----------------------------------------------------------------------
diff --git a/BUILD b/BUILD
index c31cb67..24be125 100644
--- a/BUILD
+++ b/BUILD
@@ -12,11 +12,11 @@
 # limitations under the License.
 #
 
-source_root('src/main/python', Page, PythonBinary, PythonLibrary)
-source_root('src/main/thrift', Page, PythonLibrary, PythonThriftLibrary)
+source_root('src/main/python', page, python_binary, python_library)
+source_root('src/main/thrift', python_library, python_thrift_library)
 
 # TODO(wickman) get rid of PythonLibrary from src/test/python:
 #   src/test/python/apache/aurora/client/BUILD:python_library(
 #   src/test/python/apache/aurora/client/cli/BUILD:python_library(
 #   src/test/python/apache/aurora/client/commands/BUILD:python_library(
-source_root('src/test/python', Page, PythonTests, PythonTestSuite, PythonLibrary)
+source_root('src/test/python', python_tests, python_test_suite, python_library)

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/2983fe25/pants
----------------------------------------------------------------------
diff --git a/pants b/pants
index ee31eec..2e44610 100755
--- a/pants
+++ b/pants
@@ -17,14 +17,17 @@ set -o nounset
 
 HERE=$(cd `dirname "${BASH_SOURCE[0]}"` && pwd)
 
-PANTS_VERSION=0.0.23
+PANTS_VERSION=0.0.17
 if ! [[ -e "$HERE/build-support/pants-$PANTS_VERSION.pex" ]]; then
   echo "Building pants.pex @ $PANTS_VERSION"
+  #TODO(yasumoto): We need to migrate to a published version of pants once
+  # pantsbuild does a release.
   "$HERE/build-support/pex" \
     -v \
-    --requirement "twitter.pants==$PANTS_VERSION" \
-    --entry-point twitter.pants.bin.pants_exe:main \
-    --repo http://effbot.org/downloads \
+    --requirement "pantsbuild.pants==$PANTS_VERSION" \
+    --entry-point pants.bin.pants_exe:main \
+    --repo https://yasumoto.github.io/cheeseshop/pantsbuild/pants/c9885e99194132a22cb18bad0131c26f2c242765/index.html
\
+    --no-wheel \
     -p "$HERE/build-support/pants-$PANTS_VERSION.pex.tmp"
   mv "$HERE/build-support/pants-$PANTS_VERSION.pex.tmp" "$HERE/build-support/pants-$PANTS_VERSION.pex"
 # 2PC
   echo "Built pants-$PANTS_VERSION.pex"

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/2983fe25/src/main/python/apache/aurora/admin/BUILD
----------------------------------------------------------------------
diff --git a/src/main/python/apache/aurora/admin/BUILD b/src/main/python/apache/aurora/admin/BUILD
index 637f4e6..7a100d1 100644
--- a/src/main/python/apache/aurora/admin/BUILD
+++ b/src/main/python/apache/aurora/admin/BUILD
@@ -14,7 +14,7 @@
 
 python_library(
   name = 'host_maintenance',
-  sources = 'host_maintenance.py',
+  sources = ['host_maintenance.py'],
   dependencies = [
     pants(':util'),
     pants('3rdparty/python:twitter.common.log'),
@@ -26,7 +26,7 @@ python_library(
 
 python_library(
   name = 'util',
-  sources = 'admin_util.py',
+  sources = ['admin_util.py'],
   dependencies = [
     pants('src/main/python/apache/aurora/client:base'),
   ]

http://git-wip-us.apache.org/repos/asf/incubator-aurora/blob/2983fe25/src/main/thrift/org/apache/aurora/gen/BUILD
----------------------------------------------------------------------
diff --git a/src/main/thrift/org/apache/aurora/gen/BUILD b/src/main/thrift/org/apache/aurora/gen/BUILD
index dd401f2..947504e 100644
--- a/src/main/thrift/org/apache/aurora/gen/BUILD
+++ b/src/main/thrift/org/apache/aurora/gen/BUILD
@@ -32,6 +32,9 @@ python_thrift_library(
 python_thrift_library(
   name = 'py-thrift-storage',
   sources = ['storage.thrift'],
+  dependencies = [
+    pants(':py-thrift'),
+  ],
 )
 
 python_library(


Mime
View raw message