Author: nieklinnenbank Date: Sat Jul 4 03:14:56 2009 New Revision: 193 Modified: trunk/site_scons/version.py Log: Python SVN bindings are now optional. The import statements of the 'svn' module are now inside the try: catch:blocks, which allows compilation of FreeNOS with SCons without the 'svn' module.
It is now only used when available. Modified: trunk/site_scons/version.py ============================================================================== --- trunk/site_scons/version.py (original) +++ trunk/site_scons/version.py Sat Jul 4 03:14:56 2009 @@ -16,9 +16,6 @@ # import datetime -import svn -import svn.core -import svn.client import os import platform import re @@ -41,6 +38,7 @@ version = expr.split(current) versionCode = 0 versionPower = 16 +url = None # Calculate version code. for v in version: @@ -49,12 +47,15 @@ # Include subversion revision. try: + import svn + import svn.client + import svn.core + context = svn.client.svn_client_create_context() rev = svn.core.svn_opt_revision_t() rev.king = svn.core.svn_opt_revision_head path = os.getcwd() currentRev = None - url = None svn.client.info(path, rev, rev, info_receiver, False, context)