From b4cfe39292ed2ebeeea648c3005369540bd49b25 Mon Sep 17 00:00:00 2001 From: Nadeem Ghani Date: Tue, 26 Sep 2017 11:39:12 -0700 Subject: [PATCH] Force behave to use older version of its dependency Behave by default just grabs the latest parse_type package as part of the setup requirement. However, the newest parse_type package (0.4.2) uses a new convention on how it handles packaging which is not in the older python versions before 2.7.13. Since we're in python 2.7.12, we break. Force requirement to use an older version as a hack to bypass this issue. Signed-off-by: Marbin Tan --- gpMgmt/bin/Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gpMgmt/bin/Makefile b/gpMgmt/bin/Makefile index 34061c361c..e0c1e6d6c8 100644 --- a/gpMgmt/bin/Makefile +++ b/gpMgmt/bin/Makefile @@ -216,7 +216,11 @@ $(BEHAVE_BIN): @cd $(PYLIB_SRC_EXT)/$(SETUP_TOOLS_DIR)/ && PYTHONPATH=$(PYTHONSRC_INSTALL_PYTHON_PATH) python setup.py install --prefix $(PYTHONSRC_INSTALL) @cd $(PYLIB_SRC_EXT)/$(PARSE_DIR)/ && PYTHONPATH=$(PYTHONSRC_INSTALL_PYTHON_PATH) python setup.py install --prefix $(PYTHONSRC_INSTALL) @cd $(PYLIB_SRC_EXT)/$(ARG_PARSE_DIR)/ && PYTHONPATH=$(PYTHONSRC_INSTALL_PYTHON_PATH) python setup.py install --prefix $(PYTHONSRC_INSTALL) - @cd $(PYLIB_SRC_EXT)/$(BEHAVE_DIR)/ && PYTHONPATH=$(PYTHONSRC_INSTALL_PYTHON_PATH) python setup.py install --prefix $(PYTHONSRC_INSTALL) + # We're forcing a change in the requirements since we're in python + # 2.7.12. There's a new syntax in the python requirements for + # parse_type 0.4.2 which breaks if you're under 2.7.13 + @cd $(PYLIB_SRC_EXT)/$(BEHAVE_DIR)/ && sed -i 's/parse_type>=0.3.4/parse_type==0.4.1/' setup.py \ + && PYTHONPATH=$(PYTHONSRC_INSTALL_PYTHON_PATH) python setup.py install --prefix $(PYTHONSRC_INSTALL) @echo "--- behave done" PYTHON_FILES=`grep -l --exclude=Makefile --exclude=gplogfilter "/bin/env python" *`\ -- GitLab