{"action":"created","issue":{"url":"https://api.github.com/repos/python/cpython/issues/8260","repository_url":"https://api.github.com/repos/python/cpython","labels_url":"https://api.github.com/repos/python/cpython/issues/8260/labels{/name}","comments_url":"https://api.github.com/repos/python/cpython/issues/8260/comments","events_url":"https://api.github.com/repos/python/cpython/issues/8260/events","html_url":"https://github.com/python/cpython/pull/8260","id":340453325,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAwODYyNDE2","number":8260,"title":"bpo-32430: During 'configure', don't copy Setup.dist to Setup.","user":{"login":"nascheme","id":690853,"node_id":"MDQ6VXNlcjY5MDg1Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/690853?v=4","gravatar_id":"","url":"https://api.github.com/users/nascheme","html_url":"https://github.com/nascheme","followers_url":"https://api.github.com/users/nascheme/followers","following_url":"https://api.github.com/users/nascheme/following{/other_user}","gists_url":"https://api.github.com/users/nascheme/gists{/gist_id}","starred_url":"https://api.github.com/users/nascheme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nascheme/subscriptions","organizations_url":"https://api.github.com/users/nascheme/orgs","repos_url":"https://api.github.com/users/nascheme/repos","events_url":"https://api.github.com/users/nascheme/events{/privacy}","received_events_url":"https://api.github.com/users/nascheme/received_events","type":"User","site_admin":false},"labels":[{"id":536945472,"node_id":"MDU6TGFiZWw1MzY5NDU0NzI=","url":"https://api.github.com/repos/python/cpython/labels/CLA%20signed","name":"CLA signed","color":"0e8a16","default":false},{"id":666980059,"node_id":"MDU6TGFiZWw2NjY5ODAwNTk=","url":"https://api.github.com/repos/python/cpython/labels/awaiting%20merge","name":"awaiting merge","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-12T00:53:32Z","updated_at":"2018-07-12T00:59:51Z","closed_at":null,"author_association":"MEMBER","pull_request":{"url":"https://api.github.com/repos/python/cpython/pulls/8260","html_url":"https://github.com/python/cpython/pull/8260","diff_url":"https://github.com/python/cpython/pull/8260.diff","patch_url":"https://github.com/python/cpython/pull/8260.patch"},"body":"In the past, users building Python were expected to modify the\r\nModules/Setup file.  In that case, preserving their local\r\nmodifications on re-execution of 'configure' was useful.  Further,\r\nto support users modifying Setup and re-runnning make, there was\r\ndependency rules in the Makefile to re-run makesetup if needed,\r\nwhich would re-generate Makefile and Modules/config.c.\r\n\r\nFor modern builds of Python, most users never touch Modules/Setup.\r\nIn that case, the behavior of preserving Modules/Setup is\r\ncounter-productive since updating Modules/Setup.dist will result in\r\na stale copy of Modules/Setup being used.  In that case 'make'\r\noutputs a warning.  In the past, the warning was the last output\r\nfrom 'make'.  Now we run setup.py and so that warning is buried\r\nunder a pile of build tool output.  So, the net effect is that the\r\nbuild can fail and the user doesn't know how to fix it.  Running\r\n'configure' again is not sufficient because the out-of-date\r\nModules/Setup file is preserved.\r\n\r\nThis change does the following:\r\n\r\n- In 'configure', don't create Modules/Setup from\r\n  Modules/Setup.dist.  If the user wants a customized Setup, they\r\n  will have to copy it themselves.\r\n\r\n- In 'makesetup', if Modules/Setup does not exist, read the config\r\n  from Modules/Setup.dist.  Note this is a bit tricky since the\r\n  source and build folders can be separate (i.e. $srcdir/Modules/xyx\r\n  is not the same as Modules/xyz).  The effect of this change is\r\n  that if Modules/Setup exists, it will be used in preference to\r\n  Modules/Setup.dist.\r\n\r\n- In the 'Makefile', stop checking for an out-of-date Modules/Setup\r\n  file.  If the user is creating Setup, we will have to trust them\r\n  to keep it up-to-date.  That should not be a problem for 3rd party\r\n  distributions like Red Hat, Debian, etc.  They would normally\r\n  start a build from a clean source tree and so nothing should be\r\n  out-of-date.\r\n\r\n- In the 'Makefile', remove the dependency rule to re-run\r\n  'makesetup'.  Again, this should never be necessary in the normal\r\n  case.  Running 'configure' will result in 'makesetup' getting run.\r\n  There is also a make target 'makesetup' if someone wants to modify\r\n  Modules/Setup and wishes to re-generate Makefile and\r\n  Modules/config.c.  Run \"make makesetup\" will process\r\n  Setup/Setup.dist.\r\n\r\n- Change getpath.c to look for Modules/config.c as the marker for a\r\n  source folder.  That file gets generated and so we can use it in\r\n  the same way that Modules/Setup was previously used.  This marker\r\n  is important in the case that separate build and source folders\r\n  are being used.\r\n\r\n<!--\r\nThanks for your contribution!\r\nPlease read this comment in its entirety. It's quite important.\r\n\r\n# Pull Request title\r\n\r\nIt should be in the following format:\r\n\r\n```\r\nbpo-NNNN: Summary of the changes made\r\n```\r\n\r\nWhere: bpo-NNNN refers to the issue number in the https://bugs.python.org.\r\n\r\nMost PRs will require an issue number. Trivial changes, like fixing a typo, do not need an issue.\r\n\r\n# Backport Pull Request title\r\n\r\nIf this is a backport PR (PR made against branches other than `master`),\r\nplease ensure that the PR title is in the following format:\r\n\r\n```\r\n[X.Y] <title from the original PR> (GH-NNNN)\r\n```\r\n\r\nWhere: [X.Y] is the branch name, e.g. [3.6].\r\n\r\nGH-NNNN refers to the PR number from `master`.\r\n\r\n-->\r\n\n\n<!-- issue-number: bpo-32430 -->\nhttps://bugs.python.org/issue32430\n<!-- /issue-number -->\n"},"comment":{"url":"https://api.github.com/repos/python/cpython/issues/comments/404356424","html_url":"https://github.com/python/cpython/pull/8260#issuecomment-404356424","issue_url":"https://api.github.com/repos/python/cpython/issues/8260","id":404356424,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNDM1NjQyNA==","user":{"login":"nascheme","id":690853,"node_id":"MDQ6VXNlcjY5MDg1Mw==","avatar_url":"https://avatars3.githubusercontent.com/u/690853?v=4","gravatar_id":"","url":"https://api.github.com/users/nascheme","html_url":"https://github.com/nascheme","followers_url":"https://api.github.com/users/nascheme/followers","following_url":"https://api.github.com/users/nascheme/following{/other_user}","gists_url":"https://api.github.com/users/nascheme/gists{/gist_id}","starred_url":"https://api.github.com/users/nascheme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nascheme/subscriptions","organizations_url":"https://api.github.com/users/nascheme/orgs","repos_url":"https://api.github.com/users/nascheme/repos","events_url":"https://api.github.com/users/nascheme/events{/privacy}","received_events_url":"https://api.github.com/users/nascheme/received_events","type":"User","site_admin":false},"created_at":"2018-07-12T00:59:51Z","updated_at":"2018-07-12T00:59:51Z","author_association":"MEMBER","body":"Renaming Setup.dist to Setup, as done in GH-8229 could be done too.  However, I don't see any benefits to doing that.  It was the behavior of 'configure' copying the file (and refusing to do so if Setup already existed) that is the real source of the trouble, IMHO.  The name of the file is not so important.  Keeping it as Setup.dist will allow some 3rd party builds to continue to work as they do things like use 'sed' to take Setup.dist and create their own customized 'Setup'.  With this PR, that will still work.  OTOH, if they try to find an existing Modules/Setup, they will fail.  Not sure which would be more common but leaving it as Setup.dist seems to more conservative fix."}}
{"actor":{"display_login":"nascheme"}}