Commit d67e4474 authored by Marco Clemencic's avatar Marco Clemencic
Browse files

do not use in genconfuser and ZipPythonDir

parent 67b05fe2
......@@ -133,9 +133,6 @@ def main():
help="print some debugging information")
parser.add_option("--debug", action="store_true",
help="print more debugging information")
parser.add_option("--lockerpath", action="store",
metavar = "DIRNAME",
help="directory where to find the module 'locker'")
parser.set_defaults(root = os.path.join("..","python"))
opts, args = parser.parse_args()
......@@ -170,23 +167,6 @@ def main():
outputfile = opts.output
# The locking ensures that nobody tries to modify the file while
# we read it.
dbLock = None
if "GAUDI_BUILD_LOCK" in os.environ:
if opts.lockerpath:
# Get the LockFile class from the locker module in GaudiPolicy or use a fake
# factory.
from locker import LockFile
except ImportError:
def LockFile(*args, **kwargs):
return None
# obtain the lock
dbLock = LockFile(os.environ["GAUDI_BUILD_LOCK"], temporary = True)
# We can disable the error on missing configurables only if we can import Gaudi.Configurables
# It must be done at this point because it may conflict with logging.basicConfig
......@@ -210,7 +190,6 @@ def main():
package_module.__path__.insert(0, os.path.join(genConfDir, package_name))
pass # ignore failures (not important)
del dbLock # Now we can let the others operate on the install area python directory
# Collecting ConfigurableUser specializations
cus = {}
......@@ -13,9 +13,6 @@ import re
import codecs
from StringIO import StringIO
# Add to the path the entry needed to import the locker module.
import locker
## Class for generic exception coming from the zipdir() function
class ZipdirError(RuntimeError):
......@@ -138,7 +135,6 @@ def zipdir(directory, no_pyc = False):
# create the file, they do not truncate each other file
zipFile = open(filename, "ab")
if zipfile.is_zipfile(filename):
infolist = zipfile.ZipFile(filename).infolist()
......@@ -174,7 +170,6 @@ def zipdir(directory, no_pyc = False):
log.error("Probably you forgot the line '# -*- coding: utf-8 -*-'")
## Main function of the script.
......@@ -202,10 +197,8 @@ def main(argv = None):
level = logging.WARNING
if opts.debug:
level = logging.DEBUG
logging.basicConfig(level = level)
if "GAUDI_BUILD_LOCK" in os.environ:
_scopedLock = locker.LockFile(os.environ["GAUDI_BUILD_LOCK"], temporary = True)
# zip all the directories passed as arguments
for d in args:
zipdir(d, opts.no_pyc)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment