[Checkins] SVN: zc.index/trunk/s Added the setup.py file in order to 'eggify' the package

Alexander Heavner alex at zope.com
Thu Feb 8 15:28:07 EST 2007


Log message for revision 72472:
  Added the setup.py file in order to 'eggify' the package
  Added the __init__.py file in order to make 'zc' a namespace package
  

Changed:
  A   zc.index/trunk/setup.py
  A   zc.index/trunk/src/zc/__init__.py

-=-
Added: zc.index/trunk/setup.py
===================================================================
--- zc.index/trunk/setup.py	2007-02-08 20:09:27 UTC (rev 72471)
+++ zc.index/trunk/setup.py	2007-02-08 20:28:06 UTC (rev 72472)
@@ -0,0 +1,12 @@
+from setuptools import setup, find_packages
+
+setup(
+    name="zc.index",
+    version="0.1dev",
+    packages=find_packages('src'),
+    package_dir={'':'src'},
+    namespace_packages=['zc'],
+    include_package_data=True,
+    install_requirements = ['setuptools'],
+    zip_safe = False
+    )

Added: zc.index/trunk/src/zc/__init__.py
===================================================================
--- zc.index/trunk/src/zc/__init__.py	2007-02-08 20:09:27 UTC (rev 72471)
+++ zc.index/trunk/src/zc/__init__.py	2007-02-08 20:28:06 UTC (rev 72472)
@@ -0,0 +1,7 @@
+# this is a namespace package
+try:
+    import pkg_resources
+    pkg_resources.declare_namespace(__name__)
+except ImportError:
+    import pkgutil
+    __path__ = pkgutil.extend_path(__path__, __name__)



More information about the Checkins mailing list