From 474cfe8de71359724181c7eebfa8500d9305df75 Mon Sep 17 00:00:00 2001 From: cclauss Date: Fri, 5 Jul 2019 12:44:01 +0200 Subject: [PATCH] Move six to tools and add to LICENSE --- .travis.yml | 10 +++++----- LICENSE | 23 +++++++++++++++++++++++ tools/license-builder.sh | 2 ++ {deps => tools}/six.py | 2 +- 4 files changed, 31 insertions(+), 6 deletions(-) rename {deps => tools}/six.py (99%) diff --git a/.travis.yml b/.travis.yml index e6f291acd433ec..c58db604703e4d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,7 +24,7 @@ jobs: install: *ccache-setup-steps script: - pyenv global ${PYTHON_VERSION} - - export PYTHONPATH="${PYTHONPATH}:$(pwd)/deps" + - export PYTHONPATH="${PYTHONPATH}:$(pwd)/tools" - ./configure - make -j2 -C out V=1 v8 @@ -39,7 +39,7 @@ jobs: install: *ccache-setup-steps script: - pyenv global ${PYTHON_VERSION} - - export PYTHONPATH="${PYTHONPATH}:$(pwd)/deps" + - export PYTHONPATH="${PYTHONPATH}:$(pwd)/tools" - ./configure - make -j2 V=1 - cp out/Release/node /home/travis/.ccache @@ -53,7 +53,7 @@ jobs: - cp /home/travis/.ccache/node out/Release/node script: - pyenv global ${PYTHON_VERSION} - - export PYTHONPATH="${PYTHONPATH}:$(pwd)/deps" + - export PYTHONPATH="${PYTHONPATH}:$(pwd)/tools" - python tools/test.py -j 2 -p dots --report --mode=release --flaky-tests=dontcare default - name: "Test C++ Suites" @@ -70,7 +70,7 @@ jobs: - touch config.gypi script: - pyenv global ${PYTHON_VERSION} - - export PYTHONPATH="${PYTHONPATH}:$(pwd)/deps" + - export PYTHONPATH="${PYTHONPATH}:$(pwd)/tools" - out/Release/cctest - make -j1 V=1 test/addons/.buildstamp test/js-native-api/.buildstamp test/node-api/.buildstamp - python tools/test.py -j 2 -p dots --report --mode=release --flaky-tests=dontcare addons js-native-api node-api @@ -80,7 +80,7 @@ jobs: node_js: "node" install: - pyenv global ${PYTHON_VERSION} - - export PYTHONPATH="${PYTHONPATH}:$(pwd)/deps" + - export PYTHONPATH="${PYTHONPATH}:$(pwd)/tools" - make lint-py-build || true script: - NODE=$(which node) make lint lint-py diff --git a/LICENSE b/LICENSE index 1f2435a7225834..177237f4c72703 100644 --- a/LICENSE +++ b/LICENSE @@ -1507,3 +1507,26 @@ The externally maintained libraries used by Node.js are: ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. """ + +- six, located at tools/six.py, is licensed as follows: + """ + Copyright (c) 2010-2019 Benjamin Peterson + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all + copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + SOFTWARE. + """ diff --git a/tools/license-builder.sh b/tools/license-builder.sh index d4c39203884df3..1c3a3f4dc8e601 100755 --- a/tools/license-builder.sh +++ b/tools/license-builder.sh @@ -106,4 +106,6 @@ addlicense "HdrHistogram" "deps/histogram" "$(cat ${rootdir}/deps/histogram/LICE addlicense "node-heapdump" "src/heap_utils.cc" \ "$(curl -sL https://raw.githubusercontent.com/bnoordhuis/node-heapdump/0ca52441e46241ffbea56a389e2856ec01c48c97/LICENSE)" +addlicense "six" "tools/six.py" "$(sed -e '/^$/,$d' -e 's/^#//' -e 's/^ //' ${rootdir}/tools/six.py)" + mv $tmplicense $licensefile diff --git a/deps/six.py b/tools/six.py similarity index 99% rename from deps/six.py rename to tools/six.py index 4c303ff973225b..b2dbc3dd976d7d 100644 --- a/deps/six.py +++ b/tools/six.py @@ -934,7 +934,7 @@ def python_2_unicode_compatible(klass): __path__ = [] # required for PEP 302 and PEP 451 __package__ = __name__ # see PEP 366 @ReservedAssignment if globals().get("__spec__") is not None: - __spec__.submodule_search_locations = [] # PEP 451 @UndefinedVariable + __spec__.submodule_search_locations = [] # noqa PEP 451 @UndefinedVariable # Remove other six meta path importers, since they cause problems. This can # happen if six is removed from sys.modules and then reloaded. (Setuptools does # this for some reason.)