commit 778081b013f072b57941f1c580065fbe9773dc64
Author: Christos Stavrakakis <cstavr@grnet.gr>
Date:   Mon Jan 28 12:46:45 2013 +0200

    Do not automatically update version files
    
    Do not automatically update version files from setup.py. From now
    on, version files are updated using 'update_version.py' script and
    'devflow'.
    
    Also removed autopkg.conf and created devflow.conf configuration file.

diff --git a/autopkg.conf b/autopkg.conf
deleted file mode 100644
index 28d56e0..0000000
--- a/autopkg.conf
+++ /dev/null
@@ -1,11 +0,0 @@
-snf-astakos-app
-snf-common
-snf-cyclades-app
-snf-cyclades-gtools
-snf-pithos-app
-snf-pithos-backend
-snf-pithos-tools
-snf-tools
-snf-webproject
-snf-quotaholder-app
-snf-stats-app
diff --git a/devflow.conf b/devflow.conf
new file mode 100644
index 0000000..b2c1dd3
--- /dev/null
+++ b/devflow.conf
@@ -0,0 +1,22 @@
+[packages]
+  [[snf-common]]
+      version_file = "snf-common/synnefo/versions/common.py"
+  [[snf-webproject]]
+      version_file = "snf-webproject/synnefo/versions/webproject.py"
+  [[snf-astakos-app]]
+      version_file = "snf-astakos-app/astakos/version.py"
+  [[snf-cyclades-app]]
+      version_file = "snf-cyclades-app/synnefo/versions/app.py"
+  [[snf-cyclades-gtools]]
+      version_file = "snf-cyclades-gtools/synnefo/versions/ganeti.py"
+  [[snf-pithos-app]]
+      version_file = "snf-pithos-app/pithos/api/version.py"
+  [[snf-pithos-backend]]
+      version_file = "snf-pithos-backend/pithos/backends/version.py"
+  [[snf-pithos-tools]]
+      version_file = "snf-pithos-tools/pithos/tools/version.py"
+  [[snf-tools]]
+      version_file = "snf-tools/synnefo_tools/version.py"
+  [[snf-quotaholder-app]]
+      version_file = "snf-quotaholder-app/quotaholder_django/version.py"
+
diff --git a/snf-astakos-app/setup.py b/snf-astakos-app/setup.py
index db22d8b..6d5f775 100644
--- a/snf-astakos-app/setup.py
+++ b/snf-astakos-app/setup.py
@@ -42,15 +42,8 @@ from fnmatch import fnmatchcase
 from distutils.util import convert_path
 
 from setuptools import setup, find_packages
-from astakos import get_version
 
 HERE = os.path.abspath(os.path.normpath(os.path.dirname(__file__)))
-try:
-    # try to update the version file
-    from synnefo.util import version
-    version.update_version('astakos', 'version', HERE)
-except ImportError:
-    pass
 
 from astakos.version import __version__
 
diff --git a/snf-common/setup.py b/snf-common/setup.py
index 837ebb4..36fdd1e 100644
--- a/snf-common/setup.py
+++ b/snf-common/setup.py
@@ -43,13 +43,6 @@ from setuptools import setup, find_packages
 
 HERE = os.path.abspath(os.path.normpath(os.path.dirname(__file__)))
 
-try:
-    # try to update the version file
-    from synnefo.util.version import update_version
-    update_version('synnefo.versions', 'common', HERE)
-except ImportError:
-    pass
-
 from synnefo.versions.common import __version__
 
 # Package info
diff --git a/snf-cyclades-app/setup.py b/snf-cyclades-app/setup.py
index 9633c13..1402b3d 100644
--- a/snf-cyclades-app/setup.py
+++ b/snf-cyclades-app/setup.py
@@ -43,13 +43,6 @@ from setuptools import setup, find_packages
 
 HERE = os.path.abspath(os.path.normpath(os.path.dirname(__file__)))
 
-try:
-    # try to update the version file
-    from synnefo.util.version import update_version
-    update_version('synnefo.versions', 'app', HERE)
-except ImportError:
-    pass
-
 from synnefo.versions.app import __version__
 
 # Package info
diff --git a/snf-cyclades-gtools/setup.py b/snf-cyclades-gtools/setup.py
index b0c95d1..89bd966 100644
--- a/snf-cyclades-gtools/setup.py
+++ b/snf-cyclades-gtools/setup.py
@@ -39,13 +39,6 @@ from setuptools import setup
 
 HERE = os.path.abspath(os.path.normpath(os.path.dirname(__file__)))
 
-try:
-    # try to update the version file
-    from synnefo.util.version import update_version
-    update_version('synnefo.versions', 'ganeti', HERE)
-except ImportError:
-    pass
-
 from synnefo.versions.ganeti import __version__
 
 setup(
diff --git a/snf-pithos-app/setup.py b/snf-pithos-app/setup.py
index 804ae7c..71356c2 100644
--- a/snf-pithos-app/setup.py
+++ b/snf-pithos-app/setup.py
@@ -42,12 +42,6 @@ from fnmatch import fnmatchcase
 from setuptools import setup, find_packages
 
 HERE = os.path.abspath(os.path.normpath(os.path.dirname(__file__)))
-try:
-    # try to update the version file
-    from synnefo.util import version
-    version.update_version('pithos.api', 'version', HERE)
-except ImportError:
-    pass
 
 from pithos.api.version import __version__
 
diff --git a/snf-pithos-backend/setup.py b/snf-pithos-backend/setup.py
index 55ec490..e141373 100644
--- a/snf-pithos-backend/setup.py
+++ b/snf-pithos-backend/setup.py
@@ -42,12 +42,6 @@ from fnmatch import fnmatchcase
 from setuptools import setup, find_packages
 
 HERE = os.path.abspath(os.path.normpath(os.path.dirname(__file__)))
-try:
-    # try to update the version file
-    from synnefo.util import version
-    version.update_version('pithos.backends', 'version', HERE)
-except ImportError:
-    pass
 
 from pithos.backends.version import __version__
 
diff --git a/snf-pithos-tools/setup.py b/snf-pithos-tools/setup.py
index 91f2fb4..1dc348d 100644
--- a/snf-pithos-tools/setup.py
+++ b/snf-pithos-tools/setup.py
@@ -44,12 +44,6 @@ from fnmatch import fnmatchcase
 from setuptools import setup, find_packages
 
 HERE = os.path.abspath(os.path.normpath(os.path.dirname(__file__)))
-try:
-    # try to update the version file
-    from synnefo.util import version
-    version.update_version('pithos.tools', 'version', HERE)
-except ImportError:
-    pass
 
 from pithos.tools.version import __version__
 
diff --git a/snf-quotaholder-app/setup.py b/snf-quotaholder-app/setup.py
index 83f2538..368b10b 100644
--- a/snf-quotaholder-app/setup.py
+++ b/snf-quotaholder-app/setup.py
@@ -37,19 +37,10 @@ distribute_setup.use_setuptools()
 
 import os
 
-from distutils.util import convert_path
-from fnmatch import fnmatchcase
 from setuptools import setup, find_packages
 
 HERE = os.path.abspath(os.path.normpath(os.path.dirname(__file__)))
 
-try:
-    # try to update the version file
-    from synnefo.util.version import update_version
-    update_version('quotaholder_django', 'version', HERE)
-except ImportError:
-    pass
-
 from quotaholder_django.version import __version__
 
 # Package info
@@ -70,35 +61,34 @@ INSTALL_REQUIRES = [
 ]
 
 setup(
-    name = 'snf-quotaholder-app',
-    version = VERSION,
-    license = 'BSD',
-    url = 'http://code.grnet.gr/',
-    description = SHORT_DESCRIPTION,
-    long_description=README + '\n\n' +  CHANGES,
-    classifiers = CLASSIFIERS,
+    name='snf-quotaholder-app',
+    version=VERSION,
+    license='BSD',
+    url='http://code.grnet.gr/',
+    description=SHORT_DESCRIPTION,
+    long_description=README + '\n\n' + CHANGES,
+    classifiers=CLASSIFIERS,
 
-    author = 'Package author',
-    author_email = 'author@grnet.gr',
-    maintainer = 'Package maintainer',
-    maintainer_email = 'maintainer@grnet.gr',
+    author='Package author',
+    author_email='author@grnet.gr',
+    maintainer='Package maintainer',
+    maintainer_email='maintainer@grnet.gr',
 
-    packages = PACKAGES,
-    include_package_data = True,
-    package_data = {
+    packages=PACKAGES,
+    include_package_data=True,
+    package_data={
         'quotaholder_django.quotaholder_app': ['fixtures/*.json']
     },
     #scripts = [
     #    'quotaholder_django/quotaholder-manage',
     #],
-    zip_safe = False,
-    install_requires = INSTALL_REQUIRES,
-    dependency_links = ['http://docs.dev.grnet.gr/pypi'],
-    entry_points = {
+    zip_safe=False,
+    install_requires=INSTALL_REQUIRES,
+    dependency_links=['http://docs.dev.grnet.gr/pypi'],
+    entry_points={
      'synnefo': [
          'web_apps = quotaholder_django.synnefo_settings:apps',
          'urls = quotaholder_django.urls:urlpatterns',
          ]
       },
 )
-
diff --git a/snf-tools/setup.py b/snf-tools/setup.py
index c08c0bf..3bbdf1f 100644
--- a/snf-tools/setup.py
+++ b/snf-tools/setup.py
@@ -45,13 +45,6 @@ from setuptools import setup, find_packages
 
 HERE = os.path.abspath(os.path.normpath(os.path.dirname(__file__)))
 
-try:
-    # try to update the version file
-    from synnefo.util.version import update_version
-    update_version('synnefo_tools', 'version', HERE)
-except ImportError:
-    pass
-
 from synnefo_tools.version import __version__
 
 # Package info
diff --git a/snf-webproject/setup.py b/snf-webproject/setup.py
index e182f1f..df496e5 100644
--- a/snf-webproject/setup.py
+++ b/snf-webproject/setup.py
@@ -43,13 +43,6 @@ from setuptools import setup, find_packages
 
 HERE = os.path.abspath(os.path.normpath(os.path.dirname(__file__)))
 
-try:
-    # try to update the version file
-    from synnefo.util.version import update_version
-    update_version('synnefo.versions', 'webproject', HERE)
-except ImportError:
-    pass
-
 from synnefo.versions.webproject import __version__
 
 # Package info
diff --git a/update_version.py b/update_version.py
new file mode 100644
index 0000000..d3072e6
--- /dev/null
+++ b/update_version.py
@@ -0,0 +1,46 @@
+#Copyright (C) 2010, 2011, 2012 GRNET S.A. All rights reserved.
+#
+#Redistribution and use in source and binary forms, with or
+#without modification, are permitted provided that the following
+#conditions are met:
+#
+#  1. Redistributions of source code must retain the above
+#     copyright notice, this list of conditions and the following
+#     disclaimer.
+#
+#  2. Redistributions in binary form must reproduce the above
+#     copyright notice, this list of conditions and the following
+#     disclaimer in the documentation and/or other materials
+#     provided with the distribution.
+#
+#THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+#OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+#WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+#PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+#CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+#SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+#LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+#USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+#AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+#LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+#ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+#POSSIBILITY OF SUCH DAMAGE.
+#
+#The views and conclusions contained in the software and
+#documentation are those of the authors and should not be
+#interpreted as representing official policies, either expressed
+#or implied, of GRNET S.A.
+
+import sys
+try:
+    from devflow import versioning
+except ImportError:
+    raise RuntimeError("devflow is build dependency")
+
+
+def main():
+    versioning.update_version()
+
+
+if __name__ == "__main__":
+    sys.exit(main())
