Bug 1346025 - Update references to moved python modules draft
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Tue, 23 May 2017 16:10:05 -0400
changeset 583708 726220b317d57f05c9f04ef9dedf63656ebe7958
parent 583707 d5e43f0b6de10dd2a276d66f5929552df7fe775d
child 630165 13896a18e265483d44d00ac57961f2a5fd513ccf
push id60507
push userahalberstadt@mozilla.com
push dateWed, 24 May 2017 13:41:54 +0000
bugs1346025
milestone55.0a1
Bug 1346025 - Update references to moved python modules MozReview-Commit-ID: 2rJafmwysUY
.gdbinit_python
.gitignore
.hgignore
.lldbinit
build/.gdbinit_python.in
build/moz.configure/init.configure
build/submit_telemetry_data.py
build/virtualenv_packages.txt
js/src/make-source-package.sh
moz.build
python/README
python/moz.build
python/mozbuild/mozbuild/virtualenv.py
testing/mozharness/configs/builds/taskcluster_firefox_win32_clang.py
testing/mozharness/configs/builds/taskcluster_firefox_win32_clang_debug.py
testing/mozharness/configs/builds/taskcluster_firefox_win32_qr_debug.py
testing/mozharness/configs/builds/taskcluster_firefox_win32_qr_opt.py
testing/mozharness/configs/builds/taskcluster_firefox_win64_asan_debug.py
testing/mozharness/configs/builds/taskcluster_firefox_win64_asan_opt.py
testing/mozharness/configs/builds/taskcluster_firefox_win64_clang.py
testing/mozharness/configs/builds/taskcluster_firefox_win64_clang_debug.py
testing/mozharness/configs/builds/taskcluster_firefox_win64_qr_debug.py
testing/mozharness/configs/builds/taskcluster_firefox_win64_qr_opt.py
testing/mozharness/configs/builds/taskcluster_firefox_windows_32_addondevel.py
testing/mozharness/configs/builds/taskcluster_firefox_windows_32_debug.py
testing/mozharness/configs/builds/taskcluster_firefox_windows_32_opt.py
testing/mozharness/configs/builds/taskcluster_firefox_windows_64_addondevel.py
testing/mozharness/configs/builds/taskcluster_firefox_windows_64_debug.py
testing/mozharness/configs/builds/taskcluster_firefox_windows_64_opt.py
testing/mozharness/mozharness/base/python.py
testing/talos/mach_commands.py
third_party/python/moz.build
tools/lint/eslint/setup_helper.py
tools/rewriting/ThirdPartyPaths.txt
--- a/.gdbinit_python
+++ b/.gdbinit_python
@@ -1,5 +1,5 @@
 python
 import sys
-sys.path.append('python/gdbpp/')
+sys.path.append('third_party/python/gdbpp/')
 import gdbpp
 end
--- a/.gitignore
+++ b/.gitignore
@@ -65,19 +65,19 @@ parser/html/java/javaparser/
 
 # Gradle cache.
 /.gradle/
 
 # Local Gradle configuration properties.
 /local.properties
 
 # Python virtualenv artifacts.
-python/psutil/**/*.so
-python/psutil/**/*.pyd
-python/psutil/build/
+third_party/python/psutil/**/*.so
+third_party/python/psutil/**/*.pyd
+third_party/python/psutil/build/
 
 # Ignore chrome.manifest files from the devtools loader
 devtools/client/chrome.manifest
 devtools/shared/chrome.manifest
 
 # Ignore node_modules directories in devtools
 devtools/**/node_modules
 
--- a/.hgignore
+++ b/.hgignore
@@ -67,19 +67,19 @@
 
 # Gradle cache.
 ^.gradle/
 
 # Local Gradle configuration properties.
 ^local.properties$
 
 # Python stuff installed at build time.
-^python/psutil/.*\.so
-^python/psutil/.*\.pyd
-^python/psutil/build/
+^third_party/python/psutil/.*\.so
+^third_party/python/psutil/.*\.pyd
+^third_party/python/psutil/build/
 
 # Git repositories
 .git/
 
 # Ignore chrome.manifest files from the devtools loader
 ^devtools/client/chrome.manifest$
 ^devtools/shared/chrome.manifest$
 
--- a/.lldbinit
+++ b/.lldbinit
@@ -1,20 +1,20 @@
 # .lldbinit file for debugging Mozilla
 
 # -----------------------------------------------------------------------------
-# For documentation on all of the commands and type summaries defined here
-# and in the accompanying Python scripts, see python/lldbutils/README.txt.
+# For documentation on all of the commands and type summaries defined here and
+# in the accompanying Python scripts, see third_party/python/lldbutils/README.txt.
 # -----------------------------------------------------------------------------
 
 # Import the module that defines complex Gecko debugging commands.  This assumes
 # you are either running lldb from the top level source directory, the objdir,
 # or the dist/bin directory.  (.lldbinit files in the objdir and dist/bin set
 # topsrcdir appropriately.)
-script topsrcdir = topsrcdir if locals().has_key("topsrcdir") else os.getcwd(); sys.path.append(os.path.join(topsrcdir, "python/lldbutils")); import lldbutils; lldbutils.init()
+script topsrcdir = topsrcdir if locals().has_key("topsrcdir") else os.getcwd(); sys.path.append(os.path.join(topsrcdir, "third_party/python/lldbutils")); import lldbutils; lldbutils.init()
 
 # Mozilla's use of UNIFIED_SOURCES to include multiple source files into a
 # single compiled file breaks lldb breakpoint setting. This works around that.
 # See http://lldb.llvm.org/troubleshooting.html for more info.
 settings set target.inline-breakpoint-strategy always
 
 # Show the dynamic type of an object when using "expr".  This, for example,
 # will show a variable declared as "nsIFrame *" that points to an nsBlockFrame
--- a/build/.gdbinit_python.in
+++ b/build/.gdbinit_python.in
@@ -1,6 +1,6 @@
 #filter substitution
 python
 import sys
-sys.path.append('@topsrcdir@/python/gdbpp')
+sys.path.append('@topsrcdir@/third_party/python/gdbpp')
 import gdbpp
 end
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -188,17 +188,17 @@ def virtualenv_python(env_python, build_
             topsrcdir, topobjdir,
             os.path.join(topobjdir, '_virtualenv'), out,
             os.path.join(topsrcdir, 'build', 'virtualenv_packages.txt'))
 
     if python:
         # If we're not in the virtualenv, we need the which module for
         # find_program.
         if normsep(sys.executable) != normsep(manager.python_path):
-            sys.path.append(os.path.join(topsrcdir, 'python', 'which'))
+            sys.path.append(os.path.join(topsrcdir, 'third_party', 'python', 'which'))
         found_python = find_program(python)
         if not found_python:
             die('The PYTHON environment variable does not contain '
                 'a valid path. Cannot find %s', python)
         python = found_python
     else:
         python = sys.executable
 
--- a/build/submit_telemetry_data.py
+++ b/build/submit_telemetry_data.py
@@ -4,17 +4,17 @@
 
 import errno
 import logging
 import os
 import sys
 import time
 
 HERE = os.path.abspath(os.path.dirname(__file__))
-sys.path.append(os.path.join(HERE, '..', 'python', 'requests'))
+sys.path.append(os.path.join(HERE, '..', 'third_party', 'python', 'requests'))
 import requests
 
 
 # Server to which to submit telemetry data
 BUILD_TELEMETRY_SERVER = 'http://52.88.27.118/build-metrics-dev'
 
 
 def submit_telemetry_data(statedir):
--- a/build/virtualenv_packages.txt
+++ b/build/virtualenv_packages.txt
@@ -1,32 +1,32 @@
 mozilla.pth:python/mach
 mozilla.pth:python/mozboot
 mozilla.pth:python/mozbuild
 mozilla.pth:python/mozlint
 mozilla.pth:python/mozversioncontrol
-mozilla.pth:python/blessings
 mozilla.pth:python/compare-locales
-mozilla.pth:python/configobj
-mozilla.pth:python/dlmanager
-mozilla.pth:python/futures
-mozilla.pth:python/jsmin
-optional:setup.py:python/psutil:build_ext:--inplace
-mozilla.pth:python/psutil
-mozilla.pth:python/pylru
-mozilla.pth:python/which
-mozilla.pth:python/pystache
-mozilla.pth:python/pyyaml/lib
-mozilla.pth:python/requests
-mozilla.pth:python/slugid
-mozilla.pth:python/py
-mozilla.pth:python/pytest
-mozilla.pth:python/pytoml
-mozilla.pth:python/redo
-mozilla.pth:python/voluptuous
+mozilla.pth:third_party/python/blessings
+mozilla.pth:third_party/python/configobj
+mozilla.pth:third_party/python/dlmanager
+mozilla.pth:third_party/python/futures
+mozilla.pth:third_party/python/jsmin
+optional:setup.py:third_party/python/psutil:build_ext:--inplace
+mozilla.pth:third_party/python/psutil
+mozilla.pth:third_party/python/pylru
+mozilla.pth:third_party/python/which
+mozilla.pth:third_party/python/pystache
+mozilla.pth:third_party/python/pyyaml/lib
+mozilla.pth:third_party/python/requests
+mozilla.pth:third_party/python/slugid
+mozilla.pth:third_party/python/py
+mozilla.pth:third_party/python/pytest
+mozilla.pth:third_party/python/pytoml
+mozilla.pth:third_party/python/redo
+mozilla.pth:third_party/python/voluptuous
 mozilla.pth:build
 objdir:build
 mozilla.pth:build/pymake
 mozilla.pth:config
 mozilla.pth:dom/bindings
 mozilla.pth:dom/bindings/parser
 mozilla.pth:dom/media/test/external
 mozilla.pth:layout/tools/reftest
@@ -41,16 +41,16 @@ mozilla.pth:testing/marionette/puppeteer
 packages.txt:testing/mozbase/packages.txt
 mozilla.pth:testing/taskcluster
 mozilla.pth:testing/tools/autotry
 mozilla.pth:testing/web-platform
 mozilla.pth:testing/web-platform/harness
 mozilla.pth:testing/web-platform/tests/tools/wptserve
 mozilla.pth:testing/web-platform/tests/tools/six
 mozilla.pth:testing/xpcshell
-mozilla.pth:python/mock-1.0.0
+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:python/pyasn1
-mozilla.pth:python/pyasn1-modules
-mozilla.pth:python/rsa
-mozilla.pth:python/PyECC
+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
--- a/js/src/make-source-package.sh
+++ b/js/src/make-source-package.sh
@@ -103,16 +103,20 @@ case $cmd in
     cp -pPR ${SRCDIR}/../public ${tgtpath}/js
     cp -pPR ${SRCDIR}/../examples ${tgtpath}/js
     find ${SRCDIR} -mindepth 1 -maxdepth 1 -not -path ${STAGING} -a -not -name ${pkg} \
         -exec cp -pPR {} ${tgtpath}/js/src \;
 
     cp -pPR \
         ${TOPSRCDIR}/python \
         ${tgtpath}
+    ${MKDIR} -p ${tgtpath}/third_party
+    cp -pPR \
+        ${TOPSRCDIR}/third_party/python \
+        ${tgtpath}/third_party
     ${MKDIR} -p ${tgtpath}/dom/bindings
     cp -pPR \
         ${TOPSRCDIR}/dom/bindings/mozwebidlcodegen \
         ${tgtpath}/dom/bindings
     ${MKDIR} -p ${tgtpath}/media/webrtc/trunk/tools
     cp -pPR \
         ${TOPSRCDIR}/media/webrtc/trunk/tools/gyp \
         ${tgtpath}/media/webrtc/trunk/tools
--- a/moz.build
+++ b/moz.build
@@ -57,16 +57,17 @@ CONFIGURE_SUBST_FILES += [
 if CONFIG['ENABLE_CLANG_PLUGIN']:
     DIRS += ['build/clang-plugin']
 
 DIRS += [
     'config',
     'python',
     'taskcluster',
     'testing/mozbase',
+    'third_party/python',
 ]
 
 if not CONFIG['JS_STANDALONE']:
     # These python manifests are included here so they get picked up without an objdir
     PYTHON_UNITTEST_MANIFESTS += [
         'testing/marionette/harness/marionette_harness/tests/harness_unit/python.ini',
     ]
 
--- a/python/README
+++ b/python/README
@@ -1,21 +1,16 @@
 This directory contains common Python code.
 
 The basic rule is that if Python code is cross-module (that's "module" in the
 Mozilla meaning - as in "module ownership") and is MPL-compatible, it should
 go here.
 
 What should not go here:
 
+* Vendored python modules (use third_party/python instead)
 * Python that is not MPL-compatible (see other-licenses/)
 * Python that has good reason to remain close to its "owning" (Mozilla)
   module (e.g. it is only being consumed from there).
 
 Historical information can be found at
 https://bugzilla.mozilla.org/show_bug.cgi?id=775243
-
-## pyyaml | pystache
-
-Used in taskcluster related mach commands to update download from github
-and remove .git and tests.
-
-Then run tests in taskcluster/tests/
+https://bugzilla.mozilla.org/show_bug.cgi?id=1346025
--- a/python/moz.build
+++ b/python/moz.build
@@ -3,113 +3,37 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 # Default extra components to build config
 with Files('**'):
     BUG_COMPONENT = ('Core', 'Build Config')
 
-with Files('PyECC/**'):
-    BUG_COMPONENT = ('Core', 'Security: PSM')
-
-with Files('blessings/**'):
-    BUG_COMPONENT = ('Core', 'Build Config')
-
 with Files('compare-locales/**'):
     BUG_COMPONENT = ('Localization Infrastructure and Tools', 'compare-locales')
 
-with Files('configobj/**'):
-    BUG_COMPONENT = ('Core', 'Build Config')
-
 with Files('devtools/**'):
     BUG_COMPONENT = ('Firefox', 'Developer Tools')
 
-with Files('dlmanager/**'):
-    BUG_COMPONENT = ('Core', 'Build Config')
-
-with Files('futures/**'):
-    BUG_COMPONENT = ('Core', 'Build Config')
-
-with Files('gdbpp/**'):
-    BUG_COMPONENT = ('Core', 'Build Config')
-
-with Files('jsmin/**'):
-    BUG_COMPONENT = ('Firefox for Android', 'Build Config & IDE Support')
-
-with Files('lldbutils/**'):
-    BUG_COMPONENT = ('Core', 'General')
-
 with Files('mach/**'):
     BUG_COMPONENT = ('Core', 'mach')
 
-with Files('mock-1.0.0/**'):
-    BUG_COMPONENT = ('Core', 'Build Config')
-
 with Files('mozboot/**'):
     BUG_COMPONENT = ('Core', 'Build Config')
 
 with Files('mozbuild/**'):
     BUG_COMPONENT = ('Core', 'Build Config')
 
 with Files('mozlint/**'):
     BUG_COMPONENT = ('Testing', 'Lint')
 
 with Files('mozversioncontrol/**'):
     BUG_COMPONENT = ('Core', 'Build Config')
 
-with Files('psutil/**'):
-    BUG_COMPONENT = ('Core', 'Build Config')
-
-with Files('py/**'):
-    BUG_COMPONENT = ('Core', 'Build Config')
-
-with Files('pyasn1/**'):
-    BUG_COMPONENT = ('Release Engineering', 'General Automation')
-
-with Files('pyasn1-modules/**'):
-    BUG_COMPONENT = ('Core', 'Security: PSM')
-
-with Files('pylru/**'):
-    BUG_COMPONENT = ('mozilla.org', 'MozillaBuild')
-
-with Files('pystache/**'):
-    BUG_COMPONENT = ('Taskcluster', 'General')
-
-with Files('pytest/**'):
-    BUG_COMPONENT = ('Testing', 'General')
-
-with Files('pytoml/**'):
-    BUG_COMPONENT = ('Core', 'Build Config')
-
-with Files('pyyaml/**'):
-    BUG_COMPONENT = ('Taskcluster', 'General')
-
-with Files('redo/**'):
-    BUG_COMPONENT = ('Core', 'Build Config')
-
-with Files('requests/**'):
-    BUG_COMPONENT = ('Core', 'Build Config')
-
-with Files('rsa/**'):
-    BUG_COMPONENT = ('Core', 'Security: PSM')
-
-with Files('slugid/**'):
-    BUG_COMPONENT = ('Taskcluster', 'Platform Libraries')
-
-with Files('virtualenv/**'):
-    BUG_COMPONENT = ('Core', 'Build Config')
-
-with Files('voluptuous/**'):
-    BUG_COMPONENT = ('Taskcluster', 'Task Configuration')
-
-with Files('which/**'):
-    BUG_COMPONENT = ('Core', 'Build Config')
-
-
 SPHINX_PYTHON_PACKAGE_DIRS += [
     'mach',
     'mozbuild/mozbuild',
     'mozbuild/mozpack',
     'mozlint/mozlint',
     'mozversioncontrol/mozversioncontrol',
 ]
 
--- a/python/mozbuild/mozbuild/virtualenv.py
+++ b/python/mozbuild/mozbuild/virtualenv.py
@@ -61,18 +61,18 @@ class VirtualenvManager(object):
                                           'python_exe.txt')
 
         self.log_handle = log_handle
         self.manifest_path = manifest_path
 
     @property
     def virtualenv_script_path(self):
         """Path to virtualenv's own populator script."""
-        return os.path.join(self.topsrcdir, 'python', 'virtualenv',
-            'virtualenv.py')
+        return os.path.join(self.topsrcdir, 'third_party', 'python',
+            'virtualenv', 'virtualenv.py')
 
     @property
     def bin_path(self):
         # virtualenv.py provides a similar API via path_locations(). However,
         # we have a bit of a chicken-and-egg problem and can't reliably
         # import virtualenv. The functionality is trivial, so just implement
         # it here.
         if IS_CYGWIN or IS_NATIVE_WIN:
--- a/testing/mozharness/configs/builds/taskcluster_firefox_win32_clang.py
+++ b/testing/mozharness/configs/builds/taskcluster_firefox_win32_clang.py
@@ -20,17 +20,17 @@ config = {
         'clone-tools',
         'build',
         'check-test',
     ],
     'exes': {
         'virtualenv': [
             sys.executable,
             os.path.join(
-                os.getcwd(), 'build', 'src', 'python', 'virtualenv', 'virtualenv.py'
+                os.getcwd(), 'build', 'src', 'third_party', 'python', 'virtualenv', 'virtualenv.py'
             )
         ],
     },
     'app_ini_path': '%(obj_dir)s/dist/bin/application.ini',
     # decides whether we want to use moz_sign_cmd in env
     'enable_signing': True,
     'vcs_share_base': os.path.join('y:', os.sep, 'hg-shared'),
     'objdir': 'obj-firefox',
--- a/testing/mozharness/configs/builds/taskcluster_firefox_win32_clang_debug.py
+++ b/testing/mozharness/configs/builds/taskcluster_firefox_win32_clang_debug.py
@@ -20,17 +20,17 @@ config = {
         'clone-tools',
         'build',
         'check-test',
     ],
     'exes': {
         'virtualenv': [
             sys.executable,
             os.path.join(
-                os.getcwd(), 'build', 'src', 'python', 'virtualenv', 'virtualenv.py'
+                os.getcwd(), 'build', 'src', 'third_party', 'python', 'virtualenv', 'virtualenv.py'
             )
         ],
     },
     'app_ini_path': '%(obj_dir)s/dist/bin/application.ini',
     # decides whether we want to use moz_sign_cmd in env
     'enable_signing': True,
     'vcs_share_base': os.path.join('y:', os.sep, 'hg-shared'),
     'objdir': 'obj-firefox',
--- a/testing/mozharness/configs/builds/taskcluster_firefox_win32_qr_debug.py
+++ b/testing/mozharness/configs/builds/taskcluster_firefox_win32_qr_debug.py
@@ -21,17 +21,17 @@ config = {
         'build',
         'generate-build-stats',
         'check-test',
     ],
     'exes': {
         'virtualenv': [
             sys.executable,
             os.path.join(
-                os.getcwd(), 'build', 'src', 'python', 'virtualenv', 'virtualenv.py'
+                os.getcwd(), 'build', 'src', 'third_party', 'python', 'virtualenv', 'virtualenv.py'
             )
         ],
     },
     'app_ini_path': '%(obj_dir)s/dist/bin/application.ini',
     # decides whether we want to use moz_sign_cmd in env
     'enable_signing': True,
     'vcs_share_base': os.path.join('y:', os.sep, 'hg-shared'),
     'objdir': 'obj-firefox',
--- a/testing/mozharness/configs/builds/taskcluster_firefox_win32_qr_opt.py
+++ b/testing/mozharness/configs/builds/taskcluster_firefox_win32_qr_opt.py
@@ -21,17 +21,17 @@ config = {
         'build',
         'generate-build-stats',
         'check-test',
     ],
     'exes': {
         'virtualenv': [
             sys.executable,
             os.path.join(
-                os.getcwd(), 'build', 'src', 'python', 'virtualenv', 'virtualenv.py'
+                os.getcwd(), 'build', 'src', 'third_party', 'python', 'virtualenv', 'virtualenv.py'
             )
         ],
     },
     'app_ini_path': '%(obj_dir)s/dist/bin/application.ini',
     # decides whether we want to use moz_sign_cmd in env
     'enable_signing': True,
     'vcs_share_base': os.path.join('y:', os.sep, 'hg-shared'),
     'objdir': 'obj-firefox',
--- a/testing/mozharness/configs/builds/taskcluster_firefox_win64_asan_debug.py
+++ b/testing/mozharness/configs/builds/taskcluster_firefox_win64_asan_debug.py
@@ -20,17 +20,17 @@ config = {
         'clone-tools',
         'build',
         'check-test',
     ],
     'exes': {
         'virtualenv': [
             sys.executable,
             os.path.join(
-                os.getcwd(), 'build', 'src', 'python', 'virtualenv', 'virtualenv.py'
+                os.getcwd(), 'build', 'src', 'third_party', 'python', 'virtualenv', 'virtualenv.py'
             )
         ],
     },
     'app_ini_path': '%(obj_dir)s/dist/bin/application.ini',
     # decides whether we want to use moz_sign_cmd in env
     'enable_signing': True,
     'vcs_share_base': os.path.join('y:', os.sep, 'hg-shared'),
     'objdir': 'obj-firefox',
--- a/testing/mozharness/configs/builds/taskcluster_firefox_win64_asan_opt.py
+++ b/testing/mozharness/configs/builds/taskcluster_firefox_win64_asan_opt.py
@@ -20,17 +20,17 @@ config = {
         'clone-tools',
         'build',
         'check-test',
     ],
     'exes': {
         'virtualenv': [
             sys.executable,
             os.path.join(
-                os.getcwd(), 'build', 'src', 'python', 'virtualenv', 'virtualenv.py'
+                os.getcwd(), 'build', 'src', 'third_party', 'python', 'virtualenv', 'virtualenv.py'
             )
         ],
     },
     'app_ini_path': '%(obj_dir)s/dist/bin/application.ini',
     # decides whether we want to use moz_sign_cmd in env
     'enable_signing': True,
     'vcs_share_base': os.path.join('y:', os.sep, 'hg-shared'),
     'objdir': 'obj-firefox',
--- a/testing/mozharness/configs/builds/taskcluster_firefox_win64_clang.py
+++ b/testing/mozharness/configs/builds/taskcluster_firefox_win64_clang.py
@@ -20,17 +20,17 @@ config = {
         'clone-tools',
         'build',
         'check-test',
     ],
     'exes': {
         'virtualenv': [
             sys.executable,
             os.path.join(
-                os.getcwd(), 'build', 'src', 'python', 'virtualenv', 'virtualenv.py'
+                os.getcwd(), 'build', 'src', 'third_party', 'python', 'virtualenv', 'virtualenv.py'
             )
         ],
     },
     'app_ini_path': '%(obj_dir)s/dist/bin/application.ini',
     # decides whether we want to use moz_sign_cmd in env
     'enable_signing': True,
     'vcs_share_base': os.path.join('y:', os.sep, 'hg-shared'),
     'objdir': 'obj-firefox',
--- a/testing/mozharness/configs/builds/taskcluster_firefox_win64_clang_debug.py
+++ b/testing/mozharness/configs/builds/taskcluster_firefox_win64_clang_debug.py
@@ -20,17 +20,17 @@ config = {
         'clone-tools',
         'build',
         'check-test',
     ],
     'exes': {
         'virtualenv': [
             sys.executable,
             os.path.join(
-                os.getcwd(), 'build', 'src', 'python', 'virtualenv', 'virtualenv.py'
+                os.getcwd(), 'build', 'src', 'third_party', 'python', 'virtualenv', 'virtualenv.py'
             )
         ],
     },
     'app_ini_path': '%(obj_dir)s/dist/bin/application.ini',
     # decides whether we want to use moz_sign_cmd in env
     'enable_signing': True,
     'vcs_share_base': os.path.join('y:', os.sep, 'hg-shared'),
     'objdir': 'obj-firefox',
--- a/testing/mozharness/configs/builds/taskcluster_firefox_win64_qr_debug.py
+++ b/testing/mozharness/configs/builds/taskcluster_firefox_win64_qr_debug.py
@@ -16,17 +16,17 @@ config = {
         'clone-tools',
         'build',
         'check-test',
     ],
     'exes': {
         'virtualenv': [
             sys.executable,
             os.path.join(
-                os.getcwd(), 'build', 'src', 'python', 'virtualenv', 'virtualenv.py'
+                os.getcwd(), 'build', 'src', 'third_party', 'python', 'virtualenv', 'virtualenv.py'
             )
         ],
     },
     'app_ini_path': '%(obj_dir)s/dist/bin/application.ini',
     # decides whether we want to use moz_sign_cmd in env
     'enable_signing': True,
     'vcs_share_base': os.path.join('y:', os.sep, 'hg-shared'),
     'objdir': 'obj-firefox',
--- a/testing/mozharness/configs/builds/taskcluster_firefox_win64_qr_opt.py
+++ b/testing/mozharness/configs/builds/taskcluster_firefox_win64_qr_opt.py
@@ -16,17 +16,17 @@ config = {
         'clone-tools',
         'build',
         'check-test',
     ],
     'exes': {
         'virtualenv': [
             sys.executable,
             os.path.join(
-                os.getcwd(), 'build', 'src', 'python', 'virtualenv', 'virtualenv.py'
+                os.getcwd(), 'build', 'src', 'third_party', 'python', 'virtualenv', 'virtualenv.py'
             )
         ],
     },
     'app_ini_path': '%(obj_dir)s/dist/bin/application.ini',
     # decides whether we want to use moz_sign_cmd in env
     'enable_signing': True,
     'vcs_share_base': os.path.join('y:', os.sep, 'hg-shared'),
     'objdir': 'obj-firefox',
--- a/testing/mozharness/configs/builds/taskcluster_firefox_windows_32_addondevel.py
+++ b/testing/mozharness/configs/builds/taskcluster_firefox_windows_32_addondevel.py
@@ -21,17 +21,17 @@ config = {
         'build',
         'generate-build-stats',
         'check-test',
     ],
     'exes': {
         'virtualenv': [
             sys.executable,
             os.path.join(
-                os.getcwd(), 'build', 'src', 'python', 'virtualenv', 'virtualenv.py'
+                os.getcwd(), 'build', 'src', 'third_party', 'python', 'virtualenv', 'virtualenv.py'
             )
         ],
     },
     'app_ini_path': '%(obj_dir)s/dist/bin/application.ini',
     # decides whether we want to use moz_sign_cmd in env
     'enable_signing': False,
     'vcs_share_base': os.path.join('y:', os.sep, 'hg-shared'),
     'objdir': 'obj-firefox',
--- a/testing/mozharness/configs/builds/taskcluster_firefox_windows_32_debug.py
+++ b/testing/mozharness/configs/builds/taskcluster_firefox_windows_32_debug.py
@@ -21,17 +21,17 @@ config = {
         'build',
         'generate-build-stats',
         'check-test',
     ],
     'exes': {
         'virtualenv': [
             sys.executable,
             os.path.join(
-                os.getcwd(), 'build', 'src', 'python', 'virtualenv', 'virtualenv.py'
+                os.getcwd(), 'build', 'src', 'third_party', 'python', 'virtualenv', 'virtualenv.py'
             )
         ],
     },
     'app_ini_path': '%(obj_dir)s/dist/bin/application.ini',
     # decides whether we want to use moz_sign_cmd in env
     'enable_signing': True,
     'vcs_share_base': os.path.join('y:', os.sep, 'hg-shared'),
     'objdir': 'obj-firefox',
--- a/testing/mozharness/configs/builds/taskcluster_firefox_windows_32_opt.py
+++ b/testing/mozharness/configs/builds/taskcluster_firefox_windows_32_opt.py
@@ -21,17 +21,17 @@ config = {
         'build',
         'generate-build-stats',
         'check-test',
     ],
     'exes': {
         'virtualenv': [
             sys.executable,
             os.path.join(
-                os.getcwd(), 'build', 'src', 'python', 'virtualenv', 'virtualenv.py'
+                os.getcwd(), 'build', 'src', 'third_party', 'python', 'virtualenv', 'virtualenv.py'
             )
         ],
     },
     'app_ini_path': '%(obj_dir)s/dist/bin/application.ini',
     # decides whether we want to use moz_sign_cmd in env
     'enable_signing': True,
     'vcs_share_base': os.path.join('y:', os.sep, 'hg-shared'),
     'objdir': 'obj-firefox',
--- a/testing/mozharness/configs/builds/taskcluster_firefox_windows_64_addondevel.py
+++ b/testing/mozharness/configs/builds/taskcluster_firefox_windows_64_addondevel.py
@@ -22,17 +22,17 @@ config = {
         'build',
         'generate-build-stats',
         'check-test',
     ],
     'exes': {
         'virtualenv': [
             sys.executable,
             os.path.join(
-                os.getcwd(), 'build', 'src', 'python', 'virtualenv', 'virtualenv.py'
+                os.getcwd(), 'build', 'src', 'third_party', 'python', 'virtualenv', 'virtualenv.py'
             )
         ],
     },
     'app_ini_path': '%(obj_dir)s/dist/bin/application.ini',
     # decides whether we want to use moz_sign_cmd in env
     'enable_signing': False,
     'vcs_share_base': os.path.join('y:', os.sep, 'hg-shared'),
     'objdir': 'obj-firefox',
--- a/testing/mozharness/configs/builds/taskcluster_firefox_windows_64_debug.py
+++ b/testing/mozharness/configs/builds/taskcluster_firefox_windows_64_debug.py
@@ -21,17 +21,17 @@ config = {
         'build',
         'generate-build-stats',
         'check-test',
     ],
     'exes': {
         'virtualenv': [
             sys.executable,
             os.path.join(
-                os.getcwd(), 'build', 'src', 'python', 'virtualenv', 'virtualenv.py'
+                os.getcwd(), 'build', 'src', 'third_party', 'python', 'virtualenv', 'virtualenv.py'
             )
         ],
     },
     'app_ini_path': '%(obj_dir)s/dist/bin/application.ini',
     # decides whether we want to use moz_sign_cmd in env
     'enable_signing': True,
     'vcs_share_base': os.path.join('y:', os.sep, 'hg-shared'),
     'objdir': 'obj-firefox',
--- a/testing/mozharness/configs/builds/taskcluster_firefox_windows_64_opt.py
+++ b/testing/mozharness/configs/builds/taskcluster_firefox_windows_64_opt.py
@@ -21,17 +21,17 @@ config = {
         'build',
         'generate-build-stats',
         'check-test',
     ],
     'exes': {
         'virtualenv': [
             sys.executable,
             os.path.join(
-                os.getcwd(), 'build', 'src', 'python', 'virtualenv', 'virtualenv.py'
+                os.getcwd(), 'build', 'src', 'third_party', 'python', 'virtualenv', 'virtualenv.py'
             )
         ],
     },
     'app_ini_path': '%(obj_dir)s/dist/bin/application.ini',
     # decides whether we want to use moz_sign_cmd in env
     'enable_signing': True,
     'vcs_share_base': os.path.join('y:', os.sep, 'hg-shared'),
     'objdir': 'obj-firefox',
--- a/testing/mozharness/mozharness/base/python.py
+++ b/testing/mozharness/mozharness/base/python.py
@@ -373,17 +373,17 @@ class VirtualenvMixin(object):
         venv_path = self.query_virtualenv_path()
         self.info("Creating virtualenv %s" % venv_path)
 
         # If running from a source checkout, use the virtualenv that is
         # vendored since that is deterministic.
         if self.topsrcdir:
             virtualenv = [
                 sys.executable,
-                os.path.join(self.topsrcdir, 'python', 'virtualenv', 'virtualenv.py')
+                os.path.join(self.topsrcdir, 'third_party', 'python', 'virtualenv', 'virtualenv.py')
             ]
             virtualenv_options = c.get('virtualenv_options', [])
             # Don't create symlinks. If we don't do this, permissions issues may
             # hinder virtualenv creation or operation. Ideally we should do this
             # below when using the system virtualenv. However, this is a newer
             # feature and isn't guaranteed to be supported.
             virtualenv_options.append('--always-copy')
 
--- a/testing/talos/mach_commands.py
+++ b/testing/talos/mach_commands.py
@@ -35,17 +35,17 @@ class TalosRunner(MozbuildObject):
     def init_variables(self, talos_args):
         self.talos_dir = os.path.join(self.topsrcdir, 'testing', 'talos')
         self.mozharness_dir = os.path.join(self.topsrcdir, 'testing',
                                            'mozharness')
         self.talos_json = os.path.join(self.talos_dir, 'talos.json')
         self.config_file_path = os.path.join(self._topobjdir, 'testing',
                                              'talos-in_tree_conf.json')
         self.binary_path = self.get_binary_path()
-        self.virtualenv_script = os.path.join(self.topsrcdir, 'python',
+        self.virtualenv_script = os.path.join(self.topsrcdir, 'third_party', 'python',
                                               'virtualenv', 'virtualenv.py')
         self.virtualenv_path = os.path.join(self._topobjdir, 'testing',
                                             'talos-venv')
         self.python_interp = sys.executable
         self.talos_args = talos_args
 
     def make_config(self):
         self.config = {
new file mode 100644
--- /dev/null
+++ b/third_party/python/moz.build
@@ -0,0 +1,84 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+# Default extra components to build config
+with Files('**'):
+    BUG_COMPONENT = ('Core', 'Build Config')
+
+with Files('PyECC/**'):
+    BUG_COMPONENT = ('Core', 'Security: PSM')
+
+with Files('blessings/**'):
+    BUG_COMPONENT = ('Core', 'Build Config')
+
+with Files('configobj/**'):
+    BUG_COMPONENT = ('Core', 'Build Config')
+
+with Files('dlmanager/**'):
+    BUG_COMPONENT = ('Core', 'Build Config')
+
+with Files('futures/**'):
+    BUG_COMPONENT = ('Core', 'Build Config')
+
+with Files('gdbpp/**'):
+    BUG_COMPONENT = ('Core', 'Build Config')
+
+with Files('jsmin/**'):
+    BUG_COMPONENT = ('Firefox for Android', 'Build Config & IDE Support')
+
+with Files('lldbutils/**'):
+    BUG_COMPONENT = ('Core', 'General')
+
+with Files('mock-1.0.0/**'):
+    BUG_COMPONENT = ('Core', 'Build Config')
+
+with Files('psutil/**'):
+    BUG_COMPONENT = ('Core', 'Build Config')
+
+with Files('py/**'):
+    BUG_COMPONENT = ('Core', 'Build Config')
+
+with Files('pyasn1/**'):
+    BUG_COMPONENT = ('Release Engineering', 'General Automation')
+
+with Files('pyasn1-modules/**'):
+    BUG_COMPONENT = ('Core', 'Security: PSM')
+
+with Files('pylru/**'):
+    BUG_COMPONENT = ('mozilla.org', 'MozillaBuild')
+
+with Files('pystache/**'):
+    BUG_COMPONENT = ('Taskcluster', 'General')
+
+with Files('pytest/**'):
+    BUG_COMPONENT = ('Testing', 'General')
+
+with Files('pytoml/**'):
+    BUG_COMPONENT = ('Core', 'Build Config')
+
+with Files('pyyaml/**'):
+    BUG_COMPONENT = ('Taskcluster', 'General')
+
+with Files('redo/**'):
+    BUG_COMPONENT = ('Core', 'Build Config')
+
+with Files('requests/**'):
+    BUG_COMPONENT = ('Core', 'Build Config')
+
+with Files('rsa/**'):
+    BUG_COMPONENT = ('Core', 'Security: PSM')
+
+with Files('slugid/**'):
+    BUG_COMPONENT = ('Taskcluster', 'Platform Libraries')
+
+with Files('virtualenv/**'):
+    BUG_COMPONENT = ('Core', 'Build Config')
+
+with Files('voluptuous/**'):
+    BUG_COMPONENT = ('Taskcluster', 'Task Configuration')
+
+with Files('which/**'):
+    BUG_COMPONENT = ('Core', 'Build Config')
--- a/tools/lint/eslint/setup_helper.py
+++ b/tools/lint/eslint/setup_helper.py
@@ -7,17 +7,18 @@
 from filecmp import dircmp
 import json
 import os
 import platform
 import re
 import subprocess
 import sys
 from distutils.version import LooseVersion
-sys.path.append(os.path.join(os.path.dirname(__file__), "..", "..", "..", "python", "which"))
+sys.path.append(os.path.join(
+    os.path.dirname(__file__), "..", "..", "..", "third_party", "python", "which"))
 import which
 
 NODE_NOT_FOUND_MESSAGE = """
 nodejs v6.9.1 is either not installed or is installed to a non-standard path.
 Please install nodejs from https://nodejs.org and try again.
 
 Valid installation paths:
 """.strip()
--- a/tools/rewriting/ThirdPartyPaths.txt
+++ b/tools/rewriting/ThirdPartyPaths.txt
@@ -57,33 +57,32 @@ modules/freetype2/
 modules/libbz2/
 modules/libmar/
 modules/zlib/
 netwerk/sctp/src/
 netwerk/srtp/src/
 nsprpub/
 other-licenses/
 parser/expat/
-python/altgraph/
-python/blessings/
-python/configobj/
-python/futures/
-python/jsmin/
-python/mock-*/
-python/psutil/
-python/py/
-python/pyasn1/
-python/pyasn1-modules/
-python/PyECC/
-python/pytest/
-python/pyyaml/
-python/pytoml/
-python/redo/
-python/requests/
-python/rsa/
-python/which/
 security/nss/
 security/sandbox/chromium/
 testing/gtest/gmock/
 testing/gtest/gtest/
 testing/talos/talos/tests/dromaeo/
+third_party/python/blessings/
+third_party/python/configobj/
+third_party/python/futures/
+third_party/python/jsmin/
+third_party/python/mock-*/
+third_party/python/psutil/
+third_party/python/py/
+third_party/python/pyasn1/
+third_party/python/pyasn1-modules/
+third_party/python/PyECC/
+third_party/python/pytest/
+third_party/python/pyyaml/
+third_party/python/pytoml/
+third_party/python/redo/
+third_party/python/requests/
+third_party/python/rsa/
+third_party/python/which/
 toolkit/components/protobuf/
 toolkit/crashreporter/google-breakpad/