env.project_root = "./"
env.develop = False
env.autoremove = True
-env.packages = ['snf-pithos-lib', 'snf-pithos-backend', 'snf-pithos-app',
- 'snf-pithos-tools']
+env.packages = ['snf-pithos-backend', 'snf-pithos-app', 'snf-pithos-tools']
env.capture = False
env.colors = True
env.pypi_root = 'pypi'
# wrap local to respect global capturing setting from env.capture
oldlocal = local
+
+
def local(cmd, capture="default"):
if capture != "default":
capture = capture
def build_pkg(p):
- info ("building package: %s" % p)
+ info("building package: %s" % p)
with lcd(package_root(p)):
try:
local("rm -r dist build")
def collectdists():
if os.path.exists("./packages"):
notice("removing 'packages' directory")
- local("rm -r packages");
+ local("rm -r packages")
- local("mkdir packages");
+ local("mkdir packages")
for p in env.packages:
- local("cp %s/dist/*.tar.gz ./packages/" % package_root(p));
+ local("cp %s/dist/*.tar.gz ./packages/" % package_root(p))
def removeall():
@contextmanager
def co(c):
- current_branch = branch();
+ current_branch = branch()
git("checkout %s" % c)
# Use a try block to make sure we checkout the original branch.
try:
# Debian packaging helpers
#
-env.debian_branch = 'debian-0.8'
-env.deb_packages = ['snf-pithos-lib', 'snf-pithos-backend',
- 'snf-pithos-tools', 'snf-pithos-app']
+env.debian_branch = 'debian-0.9'
+env.deb_packages = ['snf-pithos-backend', 'snf-pithos-tools', 'snf-pithos-app']
env.signdebs = False
env.debrelease = False # Increase release number in Debian changelogs
env.upstream = 'packaging'
def _last_commit(f):
return local("git rev-list --all --date-order --max-count=1 %s" % f,
- capture=True).strip()
+ capture=True).strip()
-def _diff_from_master(c,f):
- return local("git log --oneline %s..%s %s" \
+def _diff_from_master(c, f):
+ return local("git log --oneline %s..%s %s"
" | wc -l" % (c, env.upstream, f), capture=True)
env.signdebs = True
-def builddeb(p, master="packaging", branch="debian-0.8"):
+def builddeb(p, master="packaging", branch="debian-0.9"):
with co(branch):
info("Building debian package for %s" % p)
with lcd(package_root(p)):
local("git add ./*/*/version.py -f")
local(("git-buildpackage --git-upstream-branch=%s --git-debian-branch=%s"
" --git-export=INDEX --git-ignore-new %s") %
- (master, branch, "" if env.signdebs else "-us -uc"))
+ (master, branch, "" if env.signdebs else "-us -uc"))
local("rm -rf .git")
local("git reset ./*/*/version.py")
info("Done building debian package for %s" % p)
-def builddeball(b="debian-0.8"):
+def builddeball(b="debian-0.9"):
for p in env.deb_packages:
builddeb(p=p, branch=b)
-
@roles('pypi')
def uploadtars():
put("packages/*.tar.gz", 'www/pypi/')
-