Bug 926418 - Prevent spurious newlines being added to packages.txt when running generate_diff.py on Windows; r=jhammel

This commit is contained in:
Ed Morley 2013-10-16 16:18:27 +01:00
parent fa71df56b3
commit f8f4d5d90f

View File

@ -120,16 +120,18 @@ def generate_packages_txt():
http://mxr.mozilla.org/mozilla-central/source/build/virtualenv/packages.txt
"""
prefix = 'testing/mozbase/' # relative path from topsrcdir
# relative path from topsrcdir
prefix = 'testing/mozbase/'
# gather the packages
packages = setup_development.mozbase_packages
# write them in the appropriate format
path = os.path.join(here, 'packages.txt')
with file(path, 'w') as f:
for package in sorted(packages):
f.write("%s.pth:%s%s\n" % (package, prefix, package))
packages_manifest = [("%s.pth:%s%s\n" % (package, prefix, package))
for package in sorted(packages)]
with open(path, 'wb') as f:
f.writelines(packages_manifest)
### version-related functions