[Checkins] SVN: zope.file/trunk/s A setup.py file was added so that the package can be 'eggified'

Alexander Heavner alex at zope.com
Wed Feb 7 16:51:43 EST 2007


Log message for revision 72428:
  A setup.py file was added so that the package can be 'eggified'
  The __init__.py file was updated to make zope a namespace package
  

Changed:
  A   zope.file/trunk/setup.py
  U   zope.file/trunk/src/zope/__init__.py

-=-
Added: zope.file/trunk/setup.py
===================================================================
--- zope.file/trunk/setup.py	2007-02-07 20:53:55 UTC (rev 72427)
+++ zope.file/trunk/setup.py	2007-02-07 21:51:42 UTC (rev 72428)
@@ -0,0 +1,12 @@
+from setuptools import setup, find_packages
+
+setup(
+    name="zope.file",
+    version="0.1dev",
+    packages=find_packages('src'),
+    package_dir={'':'src'},
+    namespace_packages=['zope'],
+    include_package_data=True,
+    install_requirements = ['setuptools'],
+    zip_safe = False
+    )

Modified: zope.file/trunk/src/zope/__init__.py
===================================================================
--- zope.file/trunk/src/zope/__init__.py	2007-02-07 20:53:55 UTC (rev 72427)
+++ zope.file/trunk/src/zope/__init__.py	2007-02-07 21:51:42 UTC (rev 72428)
@@ -1 +1,7 @@
-# This directory is a Python package.
+# 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