{"action":"created","issue":{"url":"https://api.github.com/repos/pyenv/pyenv/issues/1125","repository_url":"https://api.github.com/repos/pyenv/pyenv","labels_url":"https://api.github.com/repos/pyenv/pyenv/issues/1125/labels{/name}","comments_url":"https://api.github.com/repos/pyenv/pyenv/issues/1125/comments","events_url":"https://api.github.com/repos/pyenv/pyenv/issues/1125/events","html_url":"https://github.com/pyenv/pyenv/issues/1125","id":307090082,"number":1125,"title":"Cannot pass multipart options to configure","user":{"login":"ezwelty","id":377523,"avatar_url":"https://avatars0.githubusercontent.com/u/377523?v=4","gravatar_id":"","url":"https://api.github.com/users/ezwelty","html_url":"https://github.com/ezwelty","followers_url":"https://api.github.com/users/ezwelty/followers","following_url":"https://api.github.com/users/ezwelty/following{/other_user}","gists_url":"https://api.github.com/users/ezwelty/gists{/gist_id}","starred_url":"https://api.github.com/users/ezwelty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezwelty/subscriptions","organizations_url":"https://api.github.com/users/ezwelty/orgs","repos_url":"https://api.github.com/users/ezwelty/repos","events_url":"https://api.github.com/users/ezwelty/events{/privacy}","received_events_url":"https://api.github.com/users/ezwelty/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-21T00:58:22Z","updated_at":"2018-03-21T18:34:15Z","closed_at":null,"author_association":"NONE","body":"I am trying to override the paths to the Tcl/Tk libraries by setting `PYTHON_CONFIGURE_OPTS`. When building manually, I can do this:\r\n\r\n```bash\r\n./configure \\\r\n  --with-tcltk-includes=\"-I/usr/local/opt/tcl-tk/include\" \\\r\n  --with-tcltk-libs=\"-L/usr/local/opt/tcl-tk/lib -ltcl8.6 -ltk8.6\"\r\n```\r\n\r\nBut with pyenv, no matter what I try, I get:\r\n\r\n```bash\r\n$ env PYTHON_CONFIGURE_OPTS=SOMETHING pyenv install 2.7.14 --verbose\r\n...\r\nconfigure: error: unrecognized option: `-ltcl8.6'\r\n```\r\n\r\nLines of interest from the stack trace suggest a parsing bug somewhere:\r\n\r\n```\r\n+ eval 'PYTHON_CONFIGURE_OPTS_ARRAY=( \"${value[@]}\" )'\r\n++ PYTHON_CONFIGURE_OPTS_ARRAY=(\"${value[@]}\")\r\n+ [[ '' == *\\-\\-\\e\\n\\a\\b\\l\\e\\-\\s\\h\\a\\r\\e\\d* ]]\r\n+ [[ --with-tcltk-includes='-I/usr/local/opt/tcl-tk/include' --with-tcltk-libs='-L/usr/local/opt/tcl-tk/lib -ltcl8.6 -ltk8.6' == *\\-\\-\\e\\n\\a\\b\\l\\e\\-\\s\\h\\a\\r\\e\\d* ]]\r\n+ [[ '' == *\\-\\-\\s\\h\\a\\r\\e\\d* ]]\r\n+ [[ --with-tcltk-includes='-I/usr/local/opt/tcl-tk/include' --with-tcltk-libs='-L/usr/local/opt/tcl-tk/lib -ltcl8.6 -ltk8.6' == *\\-\\-\\e\\n\\a\\b\\l\\e\\-\\f\\r\\a\\m\\e\\w\\o\\r\\k* ]]\r\n+ [[ --with-tcltk-includes='-I/usr/local/opt/tcl-tk/include' --with-tcltk-libs='-L/usr/local/opt/tcl-tk/lib -ltcl8.6 -ltk8.6' == *\\-\\-\\e\\n\\a\\b\\l\\e\\-\\u\\n\\i\\v\\e\\r\\s\\a\\l\\s\\d\\k* ]]\r\n+ [[ --with-tcltk-includes='-I/usr/local/opt/tcl-tk/include' --with-tcltk-libs='-L/usr/local/opt/tcl-tk/lib -ltcl8.6 -ltk8.6' != *\\-\\-\\e\\n\\a\\b\\l\\e\\-\\u\\n\\i\\c\\o\\d\\e\\=* ]]\r\n...\r\n++ for arg in '${CONFIGURE_OPTS}' '${!PACKAGE_CONFIGURE_OPTS}' '\"${!PACKAGE_CONFIGURE_OPTS_ARRAY}\"'\r\n++ [[ --with-tcltk-includes='-I/usr/local/opt/tcl-tk/include' == \\C\\P\\P\\F\\L\\A\\G\\S\\=* ]]\r\n++ for arg in '${CONFIGURE_OPTS}' '${!PACKAGE_CONFIGURE_OPTS}' '\"${!PACKAGE_CONFIGURE_OPTS_ARRAY}\"'\r\n++ [[ --with-tcltk-libs='-L/usr/local/opt/tcl-tk/lib == \\C\\P\\P\\F\\L\\A\\G\\S\\=* ]]\r\n++ for arg in '${CONFIGURE_OPTS}' '${!PACKAGE_CONFIGURE_OPTS}' '\"${!PACKAGE_CONFIGURE_OPTS_ARRAY}\"'\r\n++ [[ -ltcl8.6 == \\C\\P\\P\\F\\L\\A\\G\\S\\=* ]]\r\n++ for arg in '${CONFIGURE_OPTS}' '${!PACKAGE_CONFIGURE_OPTS}' '\"${!PACKAGE_CONFIGURE_OPTS_ARRAY}\"'\r\n++ [[ -ltk8.6' == \\C\\P\\P\\F\\L\\A\\G\\S\\=* ]]\r\n...\r\n```\r\n\r\nValues for `PYTHON_CONFIGURE_OPTS` that I have attempted, to no avail:\r\n\r\n- `\"--with-tcltk-includes='-I/usr/local/opt/tcl-tk/include' --with-tcltk-libs='-L/usr/local/opt/tcl-tk/lib -ltcl8.6 -ltk8.6'\"`\r\n- `'--with-tcltk-includes=\"-I/usr/local/opt/tcl-tk/include\" --with-tcltk-libs=\"-L/usr/local/opt/tcl-tk/lib -ltcl8.6 -ltk8.6\"'`\r\n- `--with-tcltk-includes=-I/usr/local/opt/tcl-tk/include\\ --with-tcltk-libs=-L/usr/local/opt/tcl-tk/lib\\ -ltcl8.6\\ -ltk8.6`\r\n- `\"--with-tcltk-includes=\\\"-I/usr/local/opt/tcl-tk/include\\\" --with-tcltk-libs=\\\"-L/usr/local/opt/tcl-tk/lib -ltcl8.6 -ltk8.6\\\"\"`\r\n- `'--with-tcltk-includes=\\\"-I/usr/local/opt/tcl-tk/include\\\" --with-tcltk-libs=\\\"-L/usr/local/opt/tcl-tk/lib -ltcl8.6 -ltk8.6\\\"'`\r\n- `--with-tcltk-includes=\\\"-I/usr/local/opt/tcl-tk/include\\\"\\ --with-tcltk-libs=\\\"-L/usr/local/opt/tcl-tk/lib\\ -ltcl8.6\\ -ltk8.6\\\"`\r\n- ...\r\n"},"comment":{"url":"https://api.github.com/repos/pyenv/pyenv/issues/comments/375051198","html_url":"https://github.com/pyenv/pyenv/issues/1125#issuecomment-375051198","issue_url":"https://api.github.com/repos/pyenv/pyenv/issues/1125","id":375051198,"user":{"login":"ezwelty","id":377523,"avatar_url":"https://avatars0.githubusercontent.com/u/377523?v=4","gravatar_id":"","url":"https://api.github.com/users/ezwelty","html_url":"https://github.com/ezwelty","followers_url":"https://api.github.com/users/ezwelty/followers","following_url":"https://api.github.com/users/ezwelty/following{/other_user}","gists_url":"https://api.github.com/users/ezwelty/gists{/gist_id}","starred_url":"https://api.github.com/users/ezwelty/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ezwelty/subscriptions","organizations_url":"https://api.github.com/users/ezwelty/orgs","repos_url":"https://api.github.com/users/ezwelty/repos","events_url":"https://api.github.com/users/ezwelty/events{/privacy}","received_events_url":"https://api.github.com/users/ezwelty/received_events","type":"User","site_admin":false},"created_at":"2018-03-21T18:34:15Z","updated_at":"2018-03-21T18:34:15Z","author_association":"NONE","body":"I ended up having to hard code these settings directly in `python-build`. I suspect the only fix would be to pass options with a custom delimeter.\r\n\r\nCurrent code:\r\n\r\n```bash\r\nPYTHON_CONFIGURE_OPTS=\"--with-tcltk-includes=-I/usr/local/opt/tcl-tk/include --with-tcltk-libs='-L/usr/local/opt/tcl-tk/lib -ltcl8.6 -ltk8.6'\"\r\npackage_var_name=PYTHON\r\nPACKAGE_CONFIGURE_OPTS=\"${package_var_name}_CONFIGURE_OPTS\"\r\nfor arg in ${!PACKAGE_CONFIGURE_OPTS}; do\r\n  echo -e $arg\r\ndone\r\n```\r\n\r\n> --with-tcltk-includes=-I/usr/local/opt/tcl-tk/include\r\n--with-tcltk-libs='-L/usr/local/opt/tcl-tk/lib\r\n-ltcl8.6\r\n-ltk8.6'\r\n\r\nSuggested code:\r\n\r\n```bash\r\nPYTHON_CONFIGURE_OPTS=\"--with-tcltk-includes=-I/usr/local/opt/tcl-tk/include|--with-tcltk-libs='-L/usr/local/opt/tcl-tk/lib -ltcl8.6 -ltk8.6'\"\r\npackage_var_name=PYTHON\r\nPACKAGE_CONFIGURE_OPTS=\"${package_var_name}_CONFIGURE_OPTS\"\r\nIFS='|'; PACKAGE_CONFIGURE_OPTS=(${!PACKAGE_CONFIGURE_OPTS}); unset IFS;\r\nfor arg in \"${PACKAGE_CONFIGURE_OPTS[@]}\"; do\r\n  echo -e $arg\r\ndone\r\n```\r\n\r\n> --with-tcltk-includes=-I/usr/local/opt/tcl-tk/include\r\n--with-tcltk-libs='-L/usr/local/opt/tcl-tk/lib -ltcl8.6 -ltk8.6'\r\n"}}
{"actor":{"display_login":"ezwelty"}}