Bug 1410773: Add optional comm-central virtualenv manifest; r?Build
comm-central taskcluster builds have comm-central checkout in `comm/`. This
will add packages specified in comm-central when it checked out, and will
ignore the missing file for mozilla-central builds.
MozReview-Commit-ID: Amg5vJHoWkS
--- a/build/mach_bootstrap.py
+++ b/build/mach_bootstrap.py
@@ -117,26 +117,37 @@ CATEGORIES = {
# We submit data to telemetry approximately every this many mach invocations
TELEMETRY_SUBMISSION_FREQUENCY = 10
def search_path(mozilla_dir, packages_txt):
with open(os.path.join(mozilla_dir, packages_txt)) as f:
packages = [line.rstrip().split(':') for line in f]
- for package in packages:
+ def handle_package(package):
+ if package[0] == 'optional':
+ try:
+ for path in handle_package(package[1:]):
+ yield path
+ except:
+ pass
+
if package[0] == 'packages.txt':
assert len(package) == 2
for p in search_path(mozilla_dir, package[1]):
yield os.path.join(mozilla_dir, p)
if package[0].endswith('.pth'):
assert len(package) == 2
yield os.path.join(mozilla_dir, package[1])
+ for package in packages:
+ for path in handle_package(package):
+ yield path
+
def bootstrap(topsrcdir, mozilla_dir=None):
if mozilla_dir is None:
mozilla_dir = topsrcdir
# Ensure we are running Python 2.7+. We put this check here so we generate a
# user-friendly error message rather than a cryptic stack trace on module
# import.
--- a/build/virtualenv_packages.txt
+++ b/build/virtualenv_packages.txt
@@ -52,8 +52,9 @@ mozilla.pth:testing/xpcshell
mozilla.pth:third_party/python/mock-1.0.0
mozilla.pth:xpcom/typelib/xpt/tools
mozilla.pth:tools/docs
mozilla.pth:media/webrtc/trunk/tools/gyp/pylib
mozilla.pth:third_party/python/pyasn1
mozilla.pth:third_party/python/pyasn1-modules
mozilla.pth:third_party/python/rsa
mozilla.pth:third_party/python/PyECC
+optional:packages.txt:comm/build/virtualenv_packages.txt