You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by ha...@apache.org on 2010/02/16 22:00:03 UTC

svn commit: r910690 - in /hadoop/avro/trunk: CHANGES.txt README.txt lang/py/build.xml lang/py/setup.py lang/py/test/gen_interop_data.py lang/ruby/interop/test_interop.rb lang/ruby/test/random_data.rb share/rat-excludes.txt

Author: hammer
Date: Tue Feb 16 21:00:02 2010
New Revision: 910690

URL: http://svn.apache.org/viewvc?rev=910690&view=rev
Log:
AVRO-136. Add support for building/releasing python eggs (hammer)


Added:
    hadoop/avro/trunk/lang/py/setup.py   (with props)
Modified:
    hadoop/avro/trunk/CHANGES.txt
    hadoop/avro/trunk/README.txt
    hadoop/avro/trunk/lang/py/build.xml
    hadoop/avro/trunk/lang/py/test/gen_interop_data.py
    hadoop/avro/trunk/lang/ruby/interop/test_interop.rb
    hadoop/avro/trunk/lang/ruby/test/random_data.rb
    hadoop/avro/trunk/share/rat-excludes.txt

Modified: hadoop/avro/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/CHANGES.txt?rev=910690&r1=910689&r2=910690&view=diff
==============================================================================
--- hadoop/avro/trunk/CHANGES.txt (original)
+++ hadoop/avro/trunk/CHANGES.txt Tue Feb 16 21:00:02 2010
@@ -93,6 +93,8 @@
     AVRO-287. Make RPC interop tests work with new Python implementation
     (hammer)
 
+    AVRO-136. Add support for building/releasing python eggs (hammer)
+
   IMPROVEMENTS
 
     AVRO-157. Changes from code review comments for C++. (sbanacho)

Modified: hadoop/avro/trunk/README.txt
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/README.txt?rev=910690&r1=910689&r2=910690&view=diff
==============================================================================
--- hadoop/avro/trunk/README.txt (original)
+++ hadoop/avro/trunk/README.txt Tue Feb 16 21:00:02 2010
@@ -9,7 +9,7 @@
 The following packages must be installed before Avro can be built:
 
  - Java: JDK 1.6
- - Python: 2.5 or greater
+ - Python: 2.5 or greater, python-setuptools for dist target
  - C: gcc, autoconf, automake, libtool, asciidoc 
  - C++: g++, flex, bison, libboost-dev
  - Ruby: ruby, gem, rake, echoe, jajl-ruby

Modified: hadoop/avro/trunk/lang/py/build.xml
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/lang/py/build.xml?rev=910690&r1=910689&r2=910690&view=diff
==============================================================================
--- hadoop/avro/trunk/lang/py/build.xml (original)
+++ hadoop/avro/trunk/lang/py/build.xml Tue Feb 16 21:00:02 2010
@@ -29,8 +29,6 @@
     <file file="${share.dir}/VERSION.txt"/>
   </loadresource>
 
-  <property name="doc.dir" value="${basedir}/../../build/avro-doc-${version}"/>
-
   <path id="java.classpath">
     <fileset dir="lib">
       <include name="**/*.jar" />
@@ -83,17 +81,13 @@
     </exec>
   </target>
 
-  <target name="doc" description="Generate python api docs">
-    <taskdef name="py-doc" classname="org.pyant.tasks.PythonDocTask"
-	     classpathref="java.classpath"/>
-    <mkdir dir="${doc.dir}/api/py"/>
-    <py-doc python="python" pythonpathref="test.path" defaultexcludes="true"
-       destdir="${doc.dir}/api/py">
-      <fileset dir="${basedir}/src"/>
-    </py-doc>
-  </target>
-
-  <target name="dist" depends="doc" description="Build distribution">
+  <target name="dist" description="Build egg">
+    <mkdir dir="${dist.dir}"/>
+    <exec executable="python" failonerror="true">
+      <arg value="setup.py"/>
+      <arg value="bdist_egg"/>
+      <arg value="--dist-dir=${dist.dir}"/>
+    </exec>
   </target>
 
   <target name="clean" description="Delete build files, and their directories">

Added: hadoop/avro/trunk/lang/py/setup.py
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/lang/py/setup.py?rev=910690&view=auto
==============================================================================
--- hadoop/avro/trunk/lang/py/setup.py (added)
+++ hadoop/avro/trunk/lang/py/setup.py Tue Feb 16 21:00:02 2010
@@ -0,0 +1,42 @@
+#! /usr/bin/env python
+
+# 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.
+try:
+  from setuptools import setup
+except ImportError:
+  from distutils.core import setup
+
+VERSION_FILE='../../share/VERSION.txt'
+
+setup(
+  name = 'avro',
+  version = file(VERSION_FILE, 'r').read(),
+  packages = ['avro',],
+  package_dir = {'avro': 'src/avro'},
+
+  # Project uses simplejson, so ensure that it gets installed or upgraded
+  # on the target machine
+  install_requires = ['simplejson >= 2.0.9'],
+
+  # metadata for upload to PyPI
+  author = 'Apache Avro',
+  author_email = 'avro-dev@hadoop.apache.org',
+  description = 'Avro is a serialization and RPC framework.',
+  license = 'Apache License 2.0',
+  keywords = 'avro serialization rpc',
+  url = 'http://hadoop.apache.org/avro',
+)

Propchange: hadoop/avro/trunk/lang/py/setup.py
------------------------------------------------------------------------------
    svn:executable = *

Modified: hadoop/avro/trunk/lang/py/test/gen_interop_data.py
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/lang/py/test/gen_interop_data.py?rev=910690&r1=910689&r2=910690&view=diff
==============================================================================
--- hadoop/avro/trunk/lang/py/test/gen_interop_data.py (original)
+++ hadoop/avro/trunk/lang/py/test/gen_interop_data.py Tue Feb 16 21:00:02 2010
@@ -1,3 +1,20 @@
+#!/usr/bin/env python
+
+# 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.
 import sys
 from avro import schema
 from avro import io

Modified: hadoop/avro/trunk/lang/ruby/interop/test_interop.rb
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/lang/ruby/interop/test_interop.rb?rev=910690&r1=910689&r2=910690&view=diff
==============================================================================
--- hadoop/avro/trunk/lang/ruby/interop/test_interop.rb (original)
+++ hadoop/avro/trunk/lang/ruby/interop/test_interop.rb Tue Feb 16 21:00:02 2010
@@ -1,3 +1,20 @@
+#!/usr/bin/env ruby
+# 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.
+
 require 'rubygems'
 require 'test/unit'
 require 'avro'

Modified: hadoop/avro/trunk/lang/ruby/test/random_data.rb
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/lang/ruby/test/random_data.rb?rev=910690&r1=910689&r2=910690&view=diff
==============================================================================
--- hadoop/avro/trunk/lang/ruby/test/random_data.rb (original)
+++ hadoop/avro/trunk/lang/ruby/test/random_data.rb Tue Feb 16 21:00:02 2010
@@ -1,3 +1,20 @@
+#!/usr/bin/env ruby
+# 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.
+
 class RandomData
   def initialize(schm, seed=nil)
     srand(seed) if seed

Modified: hadoop/avro/trunk/share/rat-excludes.txt
URL: http://svn.apache.org/viewvc/hadoop/avro/trunk/share/rat-excludes.txt?rev=910690&r1=910689&r2=910690&view=diff
==============================================================================
--- hadoop/avro/trunk/share/rat-excludes.txt (original)
+++ hadoop/avro/trunk/share/rat-excludes.txt Tue Feb 16 21:00:02 2010
@@ -1,4 +1,5 @@
 **/*.avpr
+**/*.avro
 **/*.avsc
 **/*.gperf
 **/*.html