aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitmodules3
-rw-r--r--libbe/util/subproc.py6
-rwxr-xr-xrelease.py10
m---------update-copyright0
4 files changed, 15 insertions, 4 deletions
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..5bbe5ed
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "update-copyright"]
+ path = update-copyright
+ url = git://gitorious.org/update-copyright/wtk.git
diff --git a/libbe/util/subproc.py b/libbe/util/subproc.py
index 2c45f0c..3a66f49 100644
--- a/libbe/util/subproc.py
+++ b/libbe/util/subproc.py
@@ -48,7 +48,7 @@ class CommandError(Exception):
def invoke(args, stdin=None, stdout=PIPE, stderr=PIPE, expect=(0,),
cwd=None, shell=None, unicode_output=True, verbose=False,
- encoding=None):
+ encoding=None, **kwargs):
"""
expect should be a tuple of allowed exit codes. cwd should be
the directory from which the command will be executed. When
@@ -70,14 +70,14 @@ def invoke(args, stdin=None, stdout=PIPE, stderr=PIPE, expect=(0,),
if shell is None:
shell = False
q = Popen(args, stdin=PIPE, stdout=stdout, stderr=stderr,
- shell=shell, cwd=cwd)
+ shell=shell, cwd=cwd, **kwargs)
else:
assert _MSWINDOWS==True, 'invalid platform'
if shell is None:
shell = True
# win32 don't have os.execvp() so have to run command in a shell
q = Popen(args, stdin=PIPE, stdout=stdout, stderr=stderr,
- shell=shell, cwd=cwd)
+ shell=shell, cwd=cwd, **kwargs)
except OSError, e:
raise CommandError(list_args, status=e.args[0], stderr=e)
stdout,stderr = q.communicate(input=stdin)
diff --git a/release.py b/release.py
index 7464871..90812fd 100755
--- a/release.py
+++ b/release.py
@@ -180,7 +180,15 @@ If you don't like what got committed, you can undo the release with
sys.exit(1)
set_release_version(_tag)
print "Update copyright information..."
- status,stdout,stderr = invoke(['update-copyright.py'])
+ env = dict(os.environ)
+ pythonpath = os.path.abspath('update-copyright')
+ if 'PYTHONPATH' in env:
+ env['PYTHONPATH'] = '{}:{}'.format(pythonpath, env['PYTHONPATH'])
+ else:
+ env['PYTHONPATH'] = pythonpath
+ status,stdout,stderr = invoke([
+ os.path.join('update-copyright', 'bin', 'update-copyright.py')],
+ env=env)
commit("Bumped to version %s" % _tag)
tag(_tag)
create_tarball(_tag)
diff --git a/update-copyright b/update-copyright
new file mode 160000
+Subproject 1e0bb15fbf0be2d440e5d1dbbaa82562c9f918b