mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 00:01:50 +00:00
Bug 830996 - implement a way to DRY mozbase packages for m-c;r=wlach ; DONTBUILD because NPOTB
This commit is contained in:
parent
2068b81c03
commit
e465729860
@ -108,6 +108,27 @@ def revert(hg_dir, excludes=()):
|
||||
if path not in excludes:
|
||||
os.remove(path)
|
||||
|
||||
###
|
||||
|
||||
def generate_packages_txt():
|
||||
"""
|
||||
generate a packages.txt file appropriate for
|
||||
http://mxr.mozilla.org/mozilla-central/source/build/virtualenv/populate_virtualenv.py
|
||||
|
||||
See also:
|
||||
http://mxr.mozilla.org/mozilla-central/source/build/virtualenv/packages.txt
|
||||
"""
|
||||
|
||||
prefix = 'testing/mozbase/' # relative path from topsrcdir
|
||||
|
||||
# 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))
|
||||
|
||||
### version-related functions
|
||||
|
||||
@ -192,7 +213,13 @@ def main(args=sys.argv[1:]):
|
||||
formatter=PlainDescriptionFormatter())
|
||||
parser.add_option('-o', '--output', dest='output',
|
||||
help="specify the output file; otherwise will be in the current directory with a name based on the hash")
|
||||
parser.add_option('--packages', dest='output_packages',
|
||||
default=False, action='store_true',
|
||||
help="generate packages.txt and exit")
|
||||
options, args = parser.parse_args(args)
|
||||
if options.output_packages:
|
||||
generate_packages_txt()
|
||||
parser.exit()
|
||||
if args:
|
||||
versions = parse_versions(*args)
|
||||
else:
|
||||
@ -304,6 +331,9 @@ def main(args=sys.argv[1:]):
|
||||
remove(os.path.join(here, directory))
|
||||
call(['cp', '-r', directory, here], cwd=src)
|
||||
|
||||
# regenerate mozbase's packages.txt
|
||||
generate_packages_txt()
|
||||
|
||||
# generate the diff and write to output file
|
||||
call(['hg', 'addremove'], cwd=hg_root)
|
||||
process = subprocess.Popen(['hg', 'diff'],
|
||||
|
13
testing/mozbase/packages.txt
Normal file
13
testing/mozbase/packages.txt
Normal file
@ -0,0 +1,13 @@
|
||||
manifestdestiny.pth:testing/mozbase/manifestdestiny
|
||||
mozb2g.pth:testing/mozbase/mozb2g
|
||||
mozcrash.pth:testing/mozbase/mozcrash
|
||||
mozdevice.pth:testing/mozbase/mozdevice
|
||||
mozfile.pth:testing/mozbase/mozfile
|
||||
mozhttpd.pth:testing/mozbase/mozhttpd
|
||||
mozinfo.pth:testing/mozbase/mozinfo
|
||||
mozinstall.pth:testing/mozbase/mozinstall
|
||||
mozlog.pth:testing/mozbase/mozlog
|
||||
mozprocess.pth:testing/mozbase/mozprocess
|
||||
mozprofile.pth:testing/mozbase/mozprofile
|
||||
mozrunner.pth:testing/mozbase/mozrunner
|
||||
moztest.pth:testing/mozbase/moztest
|
Loading…
Reference in New Issue
Block a user