[Checkins] SVN: Sandbox/J1m/zookeeper-static/ initial

Jim Fulton jim at zope.com
Tue Nov 15 11:28:33 UTC 2011


Log message for revision 123349:
  initial

Changed:
  A   Sandbox/J1m/zookeeper-static/MANIFEST.in
  A   Sandbox/J1m/zookeeper-static/README.txt
  A   Sandbox/J1m/zookeeper-static/get_source_files.py
  A   Sandbox/J1m/zookeeper-static/setup.py
  A   Sandbox/J1m/zookeeper-static/source-release-instructions.txt

-=-
Added: Sandbox/J1m/zookeeper-static/MANIFEST.in
===================================================================
--- Sandbox/J1m/zookeeper-static/MANIFEST.in	                        (rev 0)
+++ Sandbox/J1m/zookeeper-static/MANIFEST.in	2011-11-15 11:28:32 UTC (rev 123349)
@@ -0,0 +1,7 @@
+include setup.py
+include README.txt
+include ORIGINAL-README
+include LICENSE
+include c.tgz
+include pyzk_docstrings.h
+include zookeeper.c


Property changes on: Sandbox/J1m/zookeeper-static/MANIFEST.in
___________________________________________________________________
Added: svn:eol-style
   + native

Added: Sandbox/J1m/zookeeper-static/README.txt
===================================================================
--- Sandbox/J1m/zookeeper-static/README.txt	                        (rev 0)
+++ Sandbox/J1m/zookeeper-static/README.txt	2011-11-15 11:28:32 UTC (rev 123349)
@@ -0,0 +1,10 @@
+ZooKeeper Python bindings
+=========================
+
+This is a self-contained distribution of the ZooKeeper Python
+bindings. It should build on any unix-like system by just running the
+setuposcript or using an install tool like pip, easy_install or
+buildout. (Windows patches to the setup script are welcomne. :)
+
+For more information **except** building instructions, see the file
+ORIGINAL-README included in the source distribution.


Property changes on: Sandbox/J1m/zookeeper-static/README.txt
___________________________________________________________________
Added: svn:eol-style
   + native

Added: Sandbox/J1m/zookeeper-static/get_source_files.py
===================================================================
--- Sandbox/J1m/zookeeper-static/get_source_files.py	                        (rev 0)
+++ Sandbox/J1m/zookeeper-static/get_source_files.py	2011-11-15 11:28:32 UTC (rev 123349)
@@ -0,0 +1,19 @@
+import os
+import shutil
+import sys
+
+def main():
+    [srcdir] = sys.argv[1:]
+    here = os.getcwd()
+    os.chdir(os.path.join(srcdir, 'src'))
+    os.system("tar czf %s c" % os.path.join(here, 'c.tgz'))
+    shutil.copy(os.path.join('c', 'LICENSE'), here)
+    os.chdir(os.path.join('contrib', 'zkpython'))
+    shutil.copy('README', os.path.join(here, 'ORIGINAL-README'))
+    os.chdir(os.path.join('src', 'c'))
+    shutil.copy('pyzk_docstrings.h', here)
+    shutil.copy('zookeeper.c', here)
+    os.chdir(here)
+
+if __name__ == '__main__':
+    main()


Property changes on: Sandbox/J1m/zookeeper-static/get_source_files.py
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: Sandbox/J1m/zookeeper-static/setup.py
===================================================================
--- Sandbox/J1m/zookeeper-static/setup.py	                        (rev 0)
+++ Sandbox/J1m/zookeeper-static/setup.py	2011-11-15 11:28:32 UTC (rev 123349)
@@ -0,0 +1,68 @@
+#  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.
+
+name, version = 'zookeeper-static', '3.3.3a1'
+
+install_requires = ['setuptools']
+extras_require = dict(test=[])
+
+entry_points = """
+"""
+
+import distutils.command.build_ext
+import distutils.core
+import os
+import shutil
+import time
+
+def do_system(cmd):
+    print cmd
+    if os.system(cmd):
+        raise SystemError("Failed: %s" % cmd)
+
+class build_ext(distutils.command.build_ext.build_ext):
+
+    def run(self):
+        # Hack to build C sources first
+        if os.path.exists('c'):
+            print "Removing old c directory"
+            shutil.rmtree('c')
+        do_system("tar xzf c.tgz")
+        os.utime("c/config.h.in", (time.time(), time.time()))
+        do_system("cd c; ./configure; make")
+
+        distutils.command.build_ext.build_ext.run(self)
+
+distutils.core.setup(
+    author = 'Henry Robinson',
+    author_email = 'henry at cloudera.com',
+    license = 'Apache',
+
+    name = name, version = version,
+    long_description=open('README.txt').read(),
+    description = open('README.txt').read().strip().split('\n')[0],
+    cmdclass={'build_ext': build_ext},
+    ext_modules=[
+        distutils.core.Extension(
+            "zookeeper",
+            sources=["zookeeper.c"],
+            include_dirs=["c/include",
+                          "c/generated"],
+            extra_objects=["c/.libs/libzookeeper_mt.a"],
+            )
+        ],
+    )
+


Property changes on: Sandbox/J1m/zookeeper-static/setup.py
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: Sandbox/J1m/zookeeper-static/source-release-instructions.txt
===================================================================
--- Sandbox/J1m/zookeeper-static/source-release-instructions.txt	                        (rev 0)
+++ Sandbox/J1m/zookeeper-static/source-release-instructions.txt	2011-11-15 11:28:32 UTC (rev 123349)
@@ -0,0 +1,19 @@
+Creating a self-contained source release of the Zookeeper Python Binding
+========================================================================
+
+These instructions will likely need to be updated as the zookeeper
+Python bindng evolves.
+
+Run the script ``get_source_files.py`` passing the name of a directory
+containing an unpacked spource distribution.  For example::
+
+   python get_source_files.py ~/s/zookeeper-3.3.3
+
+Hack the script if necessary. :)
+
+Run setup with setuptools (or distutils) in the path::
+
+   python setup.py sdist
+
+Publish the resulting source distribution.
+


Property changes on: Sandbox/J1m/zookeeper-static/source-release-instructions.txt
___________________________________________________________________
Added: svn:eol-style
   + native



More information about the checkins mailing list