Rev 11: Guard setup.py in http://people.canonical.com/~robertc/baz2.0/plugins/gnomeserver/trunk

Robert Collins robertc at robertcollins.net
Mon Mar 1 05:13:03 GMT 2010


At http://people.canonical.com/~robertc/baz2.0/plugins/gnomeserver/trunk

------------------------------------------------------------
revno: 11
revision-id: robertc at robertcollins.net-20100301051302-6j0u8pltkkqll6iw
parent: robertc at robertcollins.net-20080709050800-b7zxh1rd3egya4pj
committer: Robert Collins <robertc at robertcollins.net>
branch nick: trunk
timestamp: Mon 2010-03-01 16:13:02 +1100
message:
  Guard setup.py
=== modified file '__init__.py'
--- a/__init__.py	2008-07-08 15:27:39 +0000
+++ b/__init__.py	2010-03-01 05:13:02 +0000
@@ -15,9 +15,7 @@
 from bzrlib.transport import get_transport
 """)
 
-
-version_info = (0, 1, 0, 'final', 0)
-__version__ = '0.1'
+from version import *
 
 
 # XXX jamesh 2008-06-23:

=== modified file 'setup.py'
--- a/setup.py	2008-07-09 05:08:00 +0000
+++ b/setup.py	2010-03-01 05:13:02 +0000
@@ -18,21 +18,18 @@
 from distutils.core import setup
 import os
 
-# Get version number from this copy of bzr-gnomeserver:
-globals = {}
-execfile(os.path.join(os.path.dirname(__file__), '__init__.py'), globals)
-version = globals['__version__']
-del globals
+from version import __version__ as version
 
-setup(
-    name='bzr-gnomeserver',
-    version=version,
-    maintainer='James Henstridge',
-    maintainer_email='james at jamesh.id.au',
-    description='Bazaar plugin providing admin functions for the GNOME server',
-    license='GNU GPL',
-    #url='https://launchpad.net/bzr-gnomeserver',
-    packages=['bzrlib.plugins.gnomeserver',
-        'bzrlib.plugins.gnomeserver.tests'],
-    package_dir={'bzrlib.plugins.gnomeserver': '.'},
-)
+if __name__ == '__main__':
+    setup(
+        name='bzr-gnomeserver',
+        version=version,
+        maintainer='James Henstridge',
+        maintainer_email='james at jamesh.id.au',
+        description='Bazaar plugin providing admin functions for the GNOME server',
+        license='GNU GPL',
+        #url='https://launchpad.net/bzr-gnomeserver',
+        packages=['bzrlib.plugins.gnomeserver',
+            'bzrlib.plugins.gnomeserver.tests'],
+        package_dir={'bzrlib.plugins.gnomeserver': '.'},
+    )

=== added file 'version.py'
--- a/version.py	1970-01-01 00:00:00 +0000
+++ b/version.py	2010-03-01 05:13:02 +0000
@@ -0,0 +1,6 @@
+"""Plugin implementing commands for use on GNOME's Bazaar server."""
+
+__all__ = ['version_info', '__version__']
+
+version_info = (0, 1, 0, 'final', 0)
+__version__ = '0.1'




More information about the bazaar-commits mailing list