diff --git a/.travis.yml b/.travis.yml index eac901c32e..2e0ebce8aa 100644 --- a/.travis.yml +++ b/.travis.yml @@ -82,7 +82,7 @@ cache: before_install: # If you update these versions, make sure you update the versions in the .st2client-install-check # and the requirements targets in the Makefile to match - - pip install --upgrade "pip>=19.3.1" + - pip install --upgrade "pip==20.0.2" - sudo pip install --upgrade "virtualenv==16.6.0" install: diff --git a/Makefile b/Makefile index 5227584f91..114fc56a6e 100644 --- a/Makefile +++ b/Makefile @@ -331,11 +331,11 @@ flake8: requirements .flake8 # If you update these versions, make sure you also update the versions in the # requirements target and .travis.yml to match # Make sure we use the latest version of pip - $(VIRTUALENV_ST2CLIENT_DIR)/bin/pip install --upgrade "pip>=19.3.1" + $(VIRTUALENV_ST2CLIENT_DIR)/bin/pip install --upgrade "pip==20.0.2" # NOTE We need to upgrade setuptools to avoid bug with dependency resolving in old versions # Setuptools 42 added support for python_requires, which is used by the configparser package, # which is required by the importlib-metadata package - $(VIRTUALENV_ST2CLIENT_DIR)/bin/pip install --upgrade "setuptools>=42" + $(VIRTUALENV_ST2CLIENT_DIR)/bin/pip install --upgrade "setuptools==44.1.0" $(VIRTUALENV_ST2CLIENT_DIR)/bin/activate; cd st2client ; ../$(VIRTUALENV_ST2CLIENT_DIR)/bin/python setup.py install ; cd .. $(VIRTUALENV_ST2CLIENT_DIR)/bin/st2 --version $(VIRTUALENV_ST2CLIENT_DIR)/bin/python -c "import st2client" @@ -446,10 +446,10 @@ requirements: virtualenv .sdist-requirements install-runners # .st2client-install-check target and .travis.yml to match # Make sure we use latest version of pip $(VIRTUALENV_DIR)/bin/pip --version - $(VIRTUALENV_DIR)/bin/pip install --upgrade "pip>=19.3.1" + $(VIRTUALENV_DIR)/bin/pip install --upgrade "pip==20.0.2" # setuptools >= 41.0.1 is required for packs.install in dev envs # setuptools >= 42 is required so setup.py install respects dependencies' python_requires - $(VIRTUALENV_DIR)/bin/pip install --upgrade "setuptools>=42" + $(VIRTUALENV_DIR)/bin/pip install --upgrade "setuptools==44.1.0" $(VIRTUALENV_DIR)/bin/pip install --upgrade "pbr==5.4.3" # workaround for pbr issue # Generate all requirements to support current CI pipeline. diff --git a/contrib/runners/action_chain_runner/dist_utils.py b/contrib/runners/action_chain_runner/dist_utils.py index 2d4e1a2a7f..b25d7998ae 100644 --- a/contrib/runners/action_chain_runner/dist_utils.py +++ b/contrib/runners/action_chain_runner/dist_utils.py @@ -1,7 +1,8 @@ +# -*- coding: utf-8 -*- # NOTE: This file is auto-generated - DO NOT EDIT MANUALLY # Instead modify scripts/dist_utils.py and run 'make .sdist-requirements' to # update dist_utils.py files for all components -# -*- coding: utf-8 -*- + # Copyright 2019 Extreme Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,6 +26,17 @@ from distutils.version import StrictVersion # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here +# +# TODO: Why can't this script rely on 3rd party dependencies? Is it because it has to import +# from pip? +# +# TODO: Dear future developer, if you are back here fixing a bug with how we parse +# requirements files, please look into using the packaging package on PyPI: +# https://packaging.pypa.io/en/latest/requirements/ +# and specifying that in the `setup_requires` argument to `setuptools.setup()` +# for subpackages. +# At the very least we can vendorize some of their code instead of reimplementing +# each piece of their code every time our parsing breaks. PY3 = sys.version_info[0] == 3 if PY3: @@ -118,6 +130,9 @@ def _get_link(line): else: req_name = line + if ';' in req_name: + req_name = req_name.split(';')[0].strip() + reqs.append(req_name) return (reqs, links) diff --git a/contrib/runners/announcement_runner/dist_utils.py b/contrib/runners/announcement_runner/dist_utils.py index 2d4e1a2a7f..b25d7998ae 100644 --- a/contrib/runners/announcement_runner/dist_utils.py +++ b/contrib/runners/announcement_runner/dist_utils.py @@ -1,7 +1,8 @@ +# -*- coding: utf-8 -*- # NOTE: This file is auto-generated - DO NOT EDIT MANUALLY # Instead modify scripts/dist_utils.py and run 'make .sdist-requirements' to # update dist_utils.py files for all components -# -*- coding: utf-8 -*- + # Copyright 2019 Extreme Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,6 +26,17 @@ from distutils.version import StrictVersion # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here +# +# TODO: Why can't this script rely on 3rd party dependencies? Is it because it has to import +# from pip? +# +# TODO: Dear future developer, if you are back here fixing a bug with how we parse +# requirements files, please look into using the packaging package on PyPI: +# https://packaging.pypa.io/en/latest/requirements/ +# and specifying that in the `setup_requires` argument to `setuptools.setup()` +# for subpackages. +# At the very least we can vendorize some of their code instead of reimplementing +# each piece of their code every time our parsing breaks. PY3 = sys.version_info[0] == 3 if PY3: @@ -118,6 +130,9 @@ def _get_link(line): else: req_name = line + if ';' in req_name: + req_name = req_name.split(';')[0].strip() + reqs.append(req_name) return (reqs, links) diff --git a/contrib/runners/http_runner/dist_utils.py b/contrib/runners/http_runner/dist_utils.py index 2d4e1a2a7f..b25d7998ae 100644 --- a/contrib/runners/http_runner/dist_utils.py +++ b/contrib/runners/http_runner/dist_utils.py @@ -1,7 +1,8 @@ +# -*- coding: utf-8 -*- # NOTE: This file is auto-generated - DO NOT EDIT MANUALLY # Instead modify scripts/dist_utils.py and run 'make .sdist-requirements' to # update dist_utils.py files for all components -# -*- coding: utf-8 -*- + # Copyright 2019 Extreme Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,6 +26,17 @@ from distutils.version import StrictVersion # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here +# +# TODO: Why can't this script rely on 3rd party dependencies? Is it because it has to import +# from pip? +# +# TODO: Dear future developer, if you are back here fixing a bug with how we parse +# requirements files, please look into using the packaging package on PyPI: +# https://packaging.pypa.io/en/latest/requirements/ +# and specifying that in the `setup_requires` argument to `setuptools.setup()` +# for subpackages. +# At the very least we can vendorize some of their code instead of reimplementing +# each piece of their code every time our parsing breaks. PY3 = sys.version_info[0] == 3 if PY3: @@ -118,6 +130,9 @@ def _get_link(line): else: req_name = line + if ';' in req_name: + req_name = req_name.split(';')[0].strip() + reqs.append(req_name) return (reqs, links) diff --git a/contrib/runners/inquirer_runner/dist_utils.py b/contrib/runners/inquirer_runner/dist_utils.py index 2d4e1a2a7f..b25d7998ae 100644 --- a/contrib/runners/inquirer_runner/dist_utils.py +++ b/contrib/runners/inquirer_runner/dist_utils.py @@ -1,7 +1,8 @@ +# -*- coding: utf-8 -*- # NOTE: This file is auto-generated - DO NOT EDIT MANUALLY # Instead modify scripts/dist_utils.py and run 'make .sdist-requirements' to # update dist_utils.py files for all components -# -*- coding: utf-8 -*- + # Copyright 2019 Extreme Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,6 +26,17 @@ from distutils.version import StrictVersion # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here +# +# TODO: Why can't this script rely on 3rd party dependencies? Is it because it has to import +# from pip? +# +# TODO: Dear future developer, if you are back here fixing a bug with how we parse +# requirements files, please look into using the packaging package on PyPI: +# https://packaging.pypa.io/en/latest/requirements/ +# and specifying that in the `setup_requires` argument to `setuptools.setup()` +# for subpackages. +# At the very least we can vendorize some of their code instead of reimplementing +# each piece of their code every time our parsing breaks. PY3 = sys.version_info[0] == 3 if PY3: @@ -118,6 +130,9 @@ def _get_link(line): else: req_name = line + if ';' in req_name: + req_name = req_name.split(';')[0].strip() + reqs.append(req_name) return (reqs, links) diff --git a/contrib/runners/local_runner/dist_utils.py b/contrib/runners/local_runner/dist_utils.py index 2d4e1a2a7f..b25d7998ae 100644 --- a/contrib/runners/local_runner/dist_utils.py +++ b/contrib/runners/local_runner/dist_utils.py @@ -1,7 +1,8 @@ +# -*- coding: utf-8 -*- # NOTE: This file is auto-generated - DO NOT EDIT MANUALLY # Instead modify scripts/dist_utils.py and run 'make .sdist-requirements' to # update dist_utils.py files for all components -# -*- coding: utf-8 -*- + # Copyright 2019 Extreme Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,6 +26,17 @@ from distutils.version import StrictVersion # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here +# +# TODO: Why can't this script rely on 3rd party dependencies? Is it because it has to import +# from pip? +# +# TODO: Dear future developer, if you are back here fixing a bug with how we parse +# requirements files, please look into using the packaging package on PyPI: +# https://packaging.pypa.io/en/latest/requirements/ +# and specifying that in the `setup_requires` argument to `setuptools.setup()` +# for subpackages. +# At the very least we can vendorize some of their code instead of reimplementing +# each piece of their code every time our parsing breaks. PY3 = sys.version_info[0] == 3 if PY3: @@ -118,6 +130,9 @@ def _get_link(line): else: req_name = line + if ';' in req_name: + req_name = req_name.split(';')[0].strip() + reqs.append(req_name) return (reqs, links) diff --git a/contrib/runners/mistral_v2/dist_utils.py b/contrib/runners/mistral_v2/dist_utils.py index 2d4e1a2a7f..b25d7998ae 100644 --- a/contrib/runners/mistral_v2/dist_utils.py +++ b/contrib/runners/mistral_v2/dist_utils.py @@ -1,7 +1,8 @@ +# -*- coding: utf-8 -*- # NOTE: This file is auto-generated - DO NOT EDIT MANUALLY # Instead modify scripts/dist_utils.py and run 'make .sdist-requirements' to # update dist_utils.py files for all components -# -*- coding: utf-8 -*- + # Copyright 2019 Extreme Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,6 +26,17 @@ from distutils.version import StrictVersion # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here +# +# TODO: Why can't this script rely on 3rd party dependencies? Is it because it has to import +# from pip? +# +# TODO: Dear future developer, if you are back here fixing a bug with how we parse +# requirements files, please look into using the packaging package on PyPI: +# https://packaging.pypa.io/en/latest/requirements/ +# and specifying that in the `setup_requires` argument to `setuptools.setup()` +# for subpackages. +# At the very least we can vendorize some of their code instead of reimplementing +# each piece of their code every time our parsing breaks. PY3 = sys.version_info[0] == 3 if PY3: @@ -118,6 +130,9 @@ def _get_link(line): else: req_name = line + if ';' in req_name: + req_name = req_name.split(';')[0].strip() + reqs.append(req_name) return (reqs, links) diff --git a/contrib/runners/noop_runner/dist_utils.py b/contrib/runners/noop_runner/dist_utils.py index 2d4e1a2a7f..b25d7998ae 100644 --- a/contrib/runners/noop_runner/dist_utils.py +++ b/contrib/runners/noop_runner/dist_utils.py @@ -1,7 +1,8 @@ +# -*- coding: utf-8 -*- # NOTE: This file is auto-generated - DO NOT EDIT MANUALLY # Instead modify scripts/dist_utils.py and run 'make .sdist-requirements' to # update dist_utils.py files for all components -# -*- coding: utf-8 -*- + # Copyright 2019 Extreme Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,6 +26,17 @@ from distutils.version import StrictVersion # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here +# +# TODO: Why can't this script rely on 3rd party dependencies? Is it because it has to import +# from pip? +# +# TODO: Dear future developer, if you are back here fixing a bug with how we parse +# requirements files, please look into using the packaging package on PyPI: +# https://packaging.pypa.io/en/latest/requirements/ +# and specifying that in the `setup_requires` argument to `setuptools.setup()` +# for subpackages. +# At the very least we can vendorize some of their code instead of reimplementing +# each piece of their code every time our parsing breaks. PY3 = sys.version_info[0] == 3 if PY3: @@ -118,6 +130,9 @@ def _get_link(line): else: req_name = line + if ';' in req_name: + req_name = req_name.split(';')[0].strip() + reqs.append(req_name) return (reqs, links) diff --git a/contrib/runners/orquesta_runner/dist_utils.py b/contrib/runners/orquesta_runner/dist_utils.py index 2d4e1a2a7f..b25d7998ae 100644 --- a/contrib/runners/orquesta_runner/dist_utils.py +++ b/contrib/runners/orquesta_runner/dist_utils.py @@ -1,7 +1,8 @@ +# -*- coding: utf-8 -*- # NOTE: This file is auto-generated - DO NOT EDIT MANUALLY # Instead modify scripts/dist_utils.py and run 'make .sdist-requirements' to # update dist_utils.py files for all components -# -*- coding: utf-8 -*- + # Copyright 2019 Extreme Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,6 +26,17 @@ from distutils.version import StrictVersion # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here +# +# TODO: Why can't this script rely on 3rd party dependencies? Is it because it has to import +# from pip? +# +# TODO: Dear future developer, if you are back here fixing a bug with how we parse +# requirements files, please look into using the packaging package on PyPI: +# https://packaging.pypa.io/en/latest/requirements/ +# and specifying that in the `setup_requires` argument to `setuptools.setup()` +# for subpackages. +# At the very least we can vendorize some of their code instead of reimplementing +# each piece of their code every time our parsing breaks. PY3 = sys.version_info[0] == 3 if PY3: @@ -118,6 +130,9 @@ def _get_link(line): else: req_name = line + if ';' in req_name: + req_name = req_name.split(';')[0].strip() + reqs.append(req_name) return (reqs, links) diff --git a/contrib/runners/python_runner/dist_utils.py b/contrib/runners/python_runner/dist_utils.py index 2d4e1a2a7f..b25d7998ae 100644 --- a/contrib/runners/python_runner/dist_utils.py +++ b/contrib/runners/python_runner/dist_utils.py @@ -1,7 +1,8 @@ +# -*- coding: utf-8 -*- # NOTE: This file is auto-generated - DO NOT EDIT MANUALLY # Instead modify scripts/dist_utils.py and run 'make .sdist-requirements' to # update dist_utils.py files for all components -# -*- coding: utf-8 -*- + # Copyright 2019 Extreme Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,6 +26,17 @@ from distutils.version import StrictVersion # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here +# +# TODO: Why can't this script rely on 3rd party dependencies? Is it because it has to import +# from pip? +# +# TODO: Dear future developer, if you are back here fixing a bug with how we parse +# requirements files, please look into using the packaging package on PyPI: +# https://packaging.pypa.io/en/latest/requirements/ +# and specifying that in the `setup_requires` argument to `setuptools.setup()` +# for subpackages. +# At the very least we can vendorize some of their code instead of reimplementing +# each piece of their code every time our parsing breaks. PY3 = sys.version_info[0] == 3 if PY3: @@ -118,6 +130,9 @@ def _get_link(line): else: req_name = line + if ';' in req_name: + req_name = req_name.split(';')[0].strip() + reqs.append(req_name) return (reqs, links) diff --git a/contrib/runners/remote_runner/dist_utils.py b/contrib/runners/remote_runner/dist_utils.py index 2d4e1a2a7f..b25d7998ae 100644 --- a/contrib/runners/remote_runner/dist_utils.py +++ b/contrib/runners/remote_runner/dist_utils.py @@ -1,7 +1,8 @@ +# -*- coding: utf-8 -*- # NOTE: This file is auto-generated - DO NOT EDIT MANUALLY # Instead modify scripts/dist_utils.py and run 'make .sdist-requirements' to # update dist_utils.py files for all components -# -*- coding: utf-8 -*- + # Copyright 2019 Extreme Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,6 +26,17 @@ from distutils.version import StrictVersion # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here +# +# TODO: Why can't this script rely on 3rd party dependencies? Is it because it has to import +# from pip? +# +# TODO: Dear future developer, if you are back here fixing a bug with how we parse +# requirements files, please look into using the packaging package on PyPI: +# https://packaging.pypa.io/en/latest/requirements/ +# and specifying that in the `setup_requires` argument to `setuptools.setup()` +# for subpackages. +# At the very least we can vendorize some of their code instead of reimplementing +# each piece of their code every time our parsing breaks. PY3 = sys.version_info[0] == 3 if PY3: @@ -118,6 +130,9 @@ def _get_link(line): else: req_name = line + if ';' in req_name: + req_name = req_name.split(';')[0].strip() + reqs.append(req_name) return (reqs, links) diff --git a/contrib/runners/winrm_runner/dist_utils.py b/contrib/runners/winrm_runner/dist_utils.py index 2d4e1a2a7f..b25d7998ae 100644 --- a/contrib/runners/winrm_runner/dist_utils.py +++ b/contrib/runners/winrm_runner/dist_utils.py @@ -1,7 +1,8 @@ +# -*- coding: utf-8 -*- # NOTE: This file is auto-generated - DO NOT EDIT MANUALLY # Instead modify scripts/dist_utils.py and run 'make .sdist-requirements' to # update dist_utils.py files for all components -# -*- coding: utf-8 -*- + # Copyright 2019 Extreme Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,6 +26,17 @@ from distutils.version import StrictVersion # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here +# +# TODO: Why can't this script rely on 3rd party dependencies? Is it because it has to import +# from pip? +# +# TODO: Dear future developer, if you are back here fixing a bug with how we parse +# requirements files, please look into using the packaging package on PyPI: +# https://packaging.pypa.io/en/latest/requirements/ +# and specifying that in the `setup_requires` argument to `setuptools.setup()` +# for subpackages. +# At the very least we can vendorize some of their code instead of reimplementing +# each piece of their code every time our parsing breaks. PY3 = sys.version_info[0] == 3 if PY3: @@ -118,6 +130,9 @@ def _get_link(line): else: req_name = line + if ';' in req_name: + req_name = req_name.split(';')[0].strip() + reqs.append(req_name) return (reqs, links) diff --git a/scripts/dist_utils.py b/scripts/dist_utils.py index 0aa90ec445..1c0f52dfff 100644 --- a/scripts/dist_utils.py +++ b/scripts/dist_utils.py @@ -21,6 +21,14 @@ from distutils.version import StrictVersion +# // NOTE: After you update this script, please run: +# // +# // make .sdist-requirements +# // +# // to copy your changes to all of our sub-package directories. +# // +# // Lines beginning with '# //', like these, will be removed from the copies. +# // # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here # # TODO: Why can't this script rely on 3rd party dependencies? Is it because it has to import @@ -29,6 +37,8 @@ # TODO: Dear future developer, if you are back here fixing a bug with how we parse # requirements files, please look into using the packaging package on PyPI: # https://packaging.pypa.io/en/latest/requirements/ +# and specifying that in the `setup_requires` argument to `setuptools.setup()` +# for subpackages. # At the very least we can vendorize some of their code instead of reimplementing # each piece of their code every time our parsing breaks. PY3 = sys.version_info[0] == 3 diff --git a/scripts/write-headers.sh b/scripts/write-headers.sh index ccbdc74d6b..4a7cfffc87 100755 --- a/scripts/write-headers.sh +++ b/scripts/write-headers.sh @@ -1,14 +1,21 @@ #!/bin/bash +# This script adds the $HEADER to the top of the file, and strips out any +# comments in the source file/s that start with '# //' +# It also keeps first line encoding hints, eg: +# -*- coding: utf-8 -*- +# that are used by popular editors and formalized in PEP 263 +# https://www.python.org/dev/peps/pep-0263/ + HEADER="# NOTE: This file is auto-generated - DO NOT EDIT MANUALLY\\ # Instead modify scripts/dist_utils.py and run 'make .sdist-requirements' to\\ # update dist_utils.py files for all components\\ " if [[ $(uname) == "Linux" ]]; then - sed -i -e "1s;^;$HEADER;" $* || exit -1 + sed -i -e "s|^\(# -\*- .*\)$|\1\\n$HEADER|; /^# \/\//d" $* || exit -1 elif [[ $(uname) == "Darwin" ]]; then - sed -i '' -e "1s;^;$HEADER;" $* || exit -1 + sed -i '' -e "s|^\(# -\*- .*\)$|\1\\n$HEADER|; /^# \/\//d" $* || exit -1 else echo >&2 "Unknown OS" exit -1 diff --git a/st2actions/dist_utils.py b/st2actions/dist_utils.py index 2d4e1a2a7f..b25d7998ae 100644 --- a/st2actions/dist_utils.py +++ b/st2actions/dist_utils.py @@ -1,7 +1,8 @@ +# -*- coding: utf-8 -*- # NOTE: This file is auto-generated - DO NOT EDIT MANUALLY # Instead modify scripts/dist_utils.py and run 'make .sdist-requirements' to # update dist_utils.py files for all components -# -*- coding: utf-8 -*- + # Copyright 2019 Extreme Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,6 +26,17 @@ from distutils.version import StrictVersion # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here +# +# TODO: Why can't this script rely on 3rd party dependencies? Is it because it has to import +# from pip? +# +# TODO: Dear future developer, if you are back here fixing a bug with how we parse +# requirements files, please look into using the packaging package on PyPI: +# https://packaging.pypa.io/en/latest/requirements/ +# and specifying that in the `setup_requires` argument to `setuptools.setup()` +# for subpackages. +# At the very least we can vendorize some of their code instead of reimplementing +# each piece of their code every time our parsing breaks. PY3 = sys.version_info[0] == 3 if PY3: @@ -118,6 +130,9 @@ def _get_link(line): else: req_name = line + if ';' in req_name: + req_name = req_name.split(';')[0].strip() + reqs.append(req_name) return (reqs, links) diff --git a/st2api/dist_utils.py b/st2api/dist_utils.py index 2d4e1a2a7f..b25d7998ae 100644 --- a/st2api/dist_utils.py +++ b/st2api/dist_utils.py @@ -1,7 +1,8 @@ +# -*- coding: utf-8 -*- # NOTE: This file is auto-generated - DO NOT EDIT MANUALLY # Instead modify scripts/dist_utils.py and run 'make .sdist-requirements' to # update dist_utils.py files for all components -# -*- coding: utf-8 -*- + # Copyright 2019 Extreme Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,6 +26,17 @@ from distutils.version import StrictVersion # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here +# +# TODO: Why can't this script rely on 3rd party dependencies? Is it because it has to import +# from pip? +# +# TODO: Dear future developer, if you are back here fixing a bug with how we parse +# requirements files, please look into using the packaging package on PyPI: +# https://packaging.pypa.io/en/latest/requirements/ +# and specifying that in the `setup_requires` argument to `setuptools.setup()` +# for subpackages. +# At the very least we can vendorize some of their code instead of reimplementing +# each piece of their code every time our parsing breaks. PY3 = sys.version_info[0] == 3 if PY3: @@ -118,6 +130,9 @@ def _get_link(line): else: req_name = line + if ';' in req_name: + req_name = req_name.split(';')[0].strip() + reqs.append(req_name) return (reqs, links) diff --git a/st2auth/dist_utils.py b/st2auth/dist_utils.py index 2d4e1a2a7f..b25d7998ae 100644 --- a/st2auth/dist_utils.py +++ b/st2auth/dist_utils.py @@ -1,7 +1,8 @@ +# -*- coding: utf-8 -*- # NOTE: This file is auto-generated - DO NOT EDIT MANUALLY # Instead modify scripts/dist_utils.py and run 'make .sdist-requirements' to # update dist_utils.py files for all components -# -*- coding: utf-8 -*- + # Copyright 2019 Extreme Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,6 +26,17 @@ from distutils.version import StrictVersion # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here +# +# TODO: Why can't this script rely on 3rd party dependencies? Is it because it has to import +# from pip? +# +# TODO: Dear future developer, if you are back here fixing a bug with how we parse +# requirements files, please look into using the packaging package on PyPI: +# https://packaging.pypa.io/en/latest/requirements/ +# and specifying that in the `setup_requires` argument to `setuptools.setup()` +# for subpackages. +# At the very least we can vendorize some of their code instead of reimplementing +# each piece of their code every time our parsing breaks. PY3 = sys.version_info[0] == 3 if PY3: @@ -118,6 +130,9 @@ def _get_link(line): else: req_name = line + if ';' in req_name: + req_name = req_name.split(';')[0].strip() + reqs.append(req_name) return (reqs, links) diff --git a/st2client/dist_utils.py b/st2client/dist_utils.py index 2d4e1a2a7f..b25d7998ae 100644 --- a/st2client/dist_utils.py +++ b/st2client/dist_utils.py @@ -1,7 +1,8 @@ +# -*- coding: utf-8 -*- # NOTE: This file is auto-generated - DO NOT EDIT MANUALLY # Instead modify scripts/dist_utils.py and run 'make .sdist-requirements' to # update dist_utils.py files for all components -# -*- coding: utf-8 -*- + # Copyright 2019 Extreme Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,6 +26,17 @@ from distutils.version import StrictVersion # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here +# +# TODO: Why can't this script rely on 3rd party dependencies? Is it because it has to import +# from pip? +# +# TODO: Dear future developer, if you are back here fixing a bug with how we parse +# requirements files, please look into using the packaging package on PyPI: +# https://packaging.pypa.io/en/latest/requirements/ +# and specifying that in the `setup_requires` argument to `setuptools.setup()` +# for subpackages. +# At the very least we can vendorize some of their code instead of reimplementing +# each piece of their code every time our parsing breaks. PY3 = sys.version_info[0] == 3 if PY3: @@ -118,6 +130,9 @@ def _get_link(line): else: req_name = line + if ';' in req_name: + req_name = req_name.split(';')[0].strip() + reqs.append(req_name) return (reqs, links) diff --git a/st2common/dist_utils.py b/st2common/dist_utils.py index 2d4e1a2a7f..b25d7998ae 100644 --- a/st2common/dist_utils.py +++ b/st2common/dist_utils.py @@ -1,7 +1,8 @@ +# -*- coding: utf-8 -*- # NOTE: This file is auto-generated - DO NOT EDIT MANUALLY # Instead modify scripts/dist_utils.py and run 'make .sdist-requirements' to # update dist_utils.py files for all components -# -*- coding: utf-8 -*- + # Copyright 2019 Extreme Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,6 +26,17 @@ from distutils.version import StrictVersion # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here +# +# TODO: Why can't this script rely on 3rd party dependencies? Is it because it has to import +# from pip? +# +# TODO: Dear future developer, if you are back here fixing a bug with how we parse +# requirements files, please look into using the packaging package on PyPI: +# https://packaging.pypa.io/en/latest/requirements/ +# and specifying that in the `setup_requires` argument to `setuptools.setup()` +# for subpackages. +# At the very least we can vendorize some of their code instead of reimplementing +# each piece of their code every time our parsing breaks. PY3 = sys.version_info[0] == 3 if PY3: @@ -118,6 +130,9 @@ def _get_link(line): else: req_name = line + if ';' in req_name: + req_name = req_name.split(';')[0].strip() + reqs.append(req_name) return (reqs, links) diff --git a/st2debug/dist_utils.py b/st2debug/dist_utils.py index 2d4e1a2a7f..b25d7998ae 100644 --- a/st2debug/dist_utils.py +++ b/st2debug/dist_utils.py @@ -1,7 +1,8 @@ +# -*- coding: utf-8 -*- # NOTE: This file is auto-generated - DO NOT EDIT MANUALLY # Instead modify scripts/dist_utils.py and run 'make .sdist-requirements' to # update dist_utils.py files for all components -# -*- coding: utf-8 -*- + # Copyright 2019 Extreme Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,6 +26,17 @@ from distutils.version import StrictVersion # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here +# +# TODO: Why can't this script rely on 3rd party dependencies? Is it because it has to import +# from pip? +# +# TODO: Dear future developer, if you are back here fixing a bug with how we parse +# requirements files, please look into using the packaging package on PyPI: +# https://packaging.pypa.io/en/latest/requirements/ +# and specifying that in the `setup_requires` argument to `setuptools.setup()` +# for subpackages. +# At the very least we can vendorize some of their code instead of reimplementing +# each piece of their code every time our parsing breaks. PY3 = sys.version_info[0] == 3 if PY3: @@ -118,6 +130,9 @@ def _get_link(line): else: req_name = line + if ';' in req_name: + req_name = req_name.split(';')[0].strip() + reqs.append(req_name) return (reqs, links) diff --git a/st2exporter/dist_utils.py b/st2exporter/dist_utils.py index 2d4e1a2a7f..b25d7998ae 100644 --- a/st2exporter/dist_utils.py +++ b/st2exporter/dist_utils.py @@ -1,7 +1,8 @@ +# -*- coding: utf-8 -*- # NOTE: This file is auto-generated - DO NOT EDIT MANUALLY # Instead modify scripts/dist_utils.py and run 'make .sdist-requirements' to # update dist_utils.py files for all components -# -*- coding: utf-8 -*- + # Copyright 2019 Extreme Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,6 +26,17 @@ from distutils.version import StrictVersion # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here +# +# TODO: Why can't this script rely on 3rd party dependencies? Is it because it has to import +# from pip? +# +# TODO: Dear future developer, if you are back here fixing a bug with how we parse +# requirements files, please look into using the packaging package on PyPI: +# https://packaging.pypa.io/en/latest/requirements/ +# and specifying that in the `setup_requires` argument to `setuptools.setup()` +# for subpackages. +# At the very least we can vendorize some of their code instead of reimplementing +# each piece of their code every time our parsing breaks. PY3 = sys.version_info[0] == 3 if PY3: @@ -118,6 +130,9 @@ def _get_link(line): else: req_name = line + if ';' in req_name: + req_name = req_name.split(';')[0].strip() + reqs.append(req_name) return (reqs, links) diff --git a/st2reactor/dist_utils.py b/st2reactor/dist_utils.py index 2d4e1a2a7f..b25d7998ae 100644 --- a/st2reactor/dist_utils.py +++ b/st2reactor/dist_utils.py @@ -1,7 +1,8 @@ +# -*- coding: utf-8 -*- # NOTE: This file is auto-generated - DO NOT EDIT MANUALLY # Instead modify scripts/dist_utils.py and run 'make .sdist-requirements' to # update dist_utils.py files for all components -# -*- coding: utf-8 -*- + # Copyright 2019 Extreme Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,6 +26,17 @@ from distutils.version import StrictVersion # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here +# +# TODO: Why can't this script rely on 3rd party dependencies? Is it because it has to import +# from pip? +# +# TODO: Dear future developer, if you are back here fixing a bug with how we parse +# requirements files, please look into using the packaging package on PyPI: +# https://packaging.pypa.io/en/latest/requirements/ +# and specifying that in the `setup_requires` argument to `setuptools.setup()` +# for subpackages. +# At the very least we can vendorize some of their code instead of reimplementing +# each piece of their code every time our parsing breaks. PY3 = sys.version_info[0] == 3 if PY3: @@ -118,6 +130,9 @@ def _get_link(line): else: req_name = line + if ';' in req_name: + req_name = req_name.split(';')[0].strip() + reqs.append(req_name) return (reqs, links) diff --git a/st2stream/dist_utils.py b/st2stream/dist_utils.py index 2d4e1a2a7f..b25d7998ae 100644 --- a/st2stream/dist_utils.py +++ b/st2stream/dist_utils.py @@ -1,7 +1,8 @@ +# -*- coding: utf-8 -*- # NOTE: This file is auto-generated - DO NOT EDIT MANUALLY # Instead modify scripts/dist_utils.py and run 'make .sdist-requirements' to # update dist_utils.py files for all components -# -*- coding: utf-8 -*- + # Copyright 2019 Extreme Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,6 +26,17 @@ from distutils.version import StrictVersion # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here +# +# TODO: Why can't this script rely on 3rd party dependencies? Is it because it has to import +# from pip? +# +# TODO: Dear future developer, if you are back here fixing a bug with how we parse +# requirements files, please look into using the packaging package on PyPI: +# https://packaging.pypa.io/en/latest/requirements/ +# and specifying that in the `setup_requires` argument to `setuptools.setup()` +# for subpackages. +# At the very least we can vendorize some of their code instead of reimplementing +# each piece of their code every time our parsing breaks. PY3 = sys.version_info[0] == 3 if PY3: @@ -118,6 +130,9 @@ def _get_link(line): else: req_name = line + if ';' in req_name: + req_name = req_name.split(';')[0].strip() + reqs.append(req_name) return (reqs, links) diff --git a/st2tests/dist_utils.py b/st2tests/dist_utils.py index 2d4e1a2a7f..b25d7998ae 100644 --- a/st2tests/dist_utils.py +++ b/st2tests/dist_utils.py @@ -1,7 +1,8 @@ +# -*- coding: utf-8 -*- # NOTE: This file is auto-generated - DO NOT EDIT MANUALLY # Instead modify scripts/dist_utils.py and run 'make .sdist-requirements' to # update dist_utils.py files for all components -# -*- coding: utf-8 -*- + # Copyright 2019 Extreme Networks, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -25,6 +26,17 @@ from distutils.version import StrictVersion # NOTE: This script can't rely on any 3rd party dependency so we need to use this code here +# +# TODO: Why can't this script rely on 3rd party dependencies? Is it because it has to import +# from pip? +# +# TODO: Dear future developer, if you are back here fixing a bug with how we parse +# requirements files, please look into using the packaging package on PyPI: +# https://packaging.pypa.io/en/latest/requirements/ +# and specifying that in the `setup_requires` argument to `setuptools.setup()` +# for subpackages. +# At the very least we can vendorize some of their code instead of reimplementing +# each piece of their code every time our parsing breaks. PY3 = sys.version_info[0] == 3 if PY3: @@ -118,6 +130,9 @@ def _get_link(line): else: req_name = line + if ';' in req_name: + req_name = req_name.split(';')[0].strip() + reqs.append(req_name) return (reqs, links)