{"action":"created","issue":{"url":"https://api.github.com/repos/sphinx-doc/testing2/issues/1499","labels_url":"https://api.github.com/repos/sphinx-doc/testing2/issues/1499/labels{/name}","comments_url":"https://api.github.com/repos/sphinx-doc/testing2/issues/1499/comments","events_url":"https://api.github.com/repos/sphinx-doc/testing2/issues/1499/events","html_url":"https://github.com/sphinx-doc/testing2/issues/1499","id":53300031,"number":1499,"title":"Make \"build_sphinx\" error more user-friendly when importing setup.py from conf.py","user":{"login":"shimizukawa","id":151623,"avatar_url":"https://avatars.githubusercontent.com/u/151623?v=3","gravatar_id":"","url":"https://api.github.com/users/shimizukawa","html_url":"https://github.com/shimizukawa","followers_url":"https://api.github.com/users/shimizukawa/followers","following_url":"https://api.github.com/users/shimizukawa/following{/other_user}","gists_url":"https://api.github.com/users/shimizukawa/gists{/gist_id}","starred_url":"https://api.github.com/users/shimizukawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shimizukawa/subscriptions","organizations_url":"https://api.github.com/users/shimizukawa/orgs","repos_url":"https://api.github.com/users/shimizukawa/repos","events_url":"https://api.github.com/users/shimizukawa/events{/privacy}","received_events_url":"https://api.github.com/users/shimizukawa/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/sphinx-doc/testing2/labels/cmdline","name":"cmdline","color":"FFFFFF"},{"url":"https://api.github.com/repos/sphinx-doc/testing2/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/sphinx-doc/testing2/labels/prio%3Alow","name":"prio:low","color":"FFFFFF"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/sphinx-doc/testing2/milestones/8","labels_url":"https://api.github.com/repos/sphinx-doc/testing2/milestones/8/labels","id":920282,"number":8,"title":"1.2.x","description":null,"creator":{"login":"shimizukawa","id":151623,"avatar_url":"https://avatars.githubusercontent.com/u/151623?v=3","gravatar_id":"","url":"https://api.github.com/users/shimizukawa","html_url":"https://github.com/shimizukawa","followers_url":"https://api.github.com/users/shimizukawa/followers","following_url":"https://api.github.com/users/shimizukawa/following{/other_user}","gists_url":"https://api.github.com/users/shimizukawa/gists{/gist_id}","starred_url":"https://api.github.com/users/shimizukawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shimizukawa/subscriptions","organizations_url":"https://api.github.com/users/shimizukawa/orgs","repos_url":"https://api.github.com/users/shimizukawa/repos","events_url":"https://api.github.com/users/shimizukawa/events{/privacy}","received_events_url":"https://api.github.com/users/shimizukawa/received_events","type":"User","site_admin":false},"open_issues":8,"closed_issues":13,"state":"open","created_at":"2015-01-03T06:03:52Z","updated_at":"2015-01-03T10:07:13Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2015-01-03T10:07:13Z","updated_at":"2015-01-03T10:07:17Z","closed_at":null,"body":"If a project imports \"setup.py\" from \"conf.py\", as `import setup`, then running the \"build_sphinx\" fails with a somewhat cryptic error message, due to `setup` being already reserved for Sphinx use.\n\n```\nTraceback (most recent call last):\n  File \"setup.py\", line 128, in <module>\n    'Topic :: Software Development :: Libraries :: Python Modules',\n  File \"C:\\Python27\\lib\\distutils\\core.py\", line 152, in setup\n    dist.run_commands()\n  File \"C:\\Python27\\lib\\distutils\\dist.py\", line 953, in run_commands\n    self.run_command(cmd)\n  File \"C:\\Python27\\lib\\distutils\\dist.py\", line 972, in run_command\n    cmd_obj.run()\n  File \"(...)\\sphinx-1.2.2-py2.7.egg\\sphinx\\setup_command.py\", line 158, in run\n    freshenv=self.fresh_env)\n  File \"(...)\\sphinx-1.2.2-py2.7.egg\\sphinx\\application.py\", line 128, in __init__\n    self.config.setup(self)\nTypeError: 'module' object is not callable\n```\n\nMaybe this edge case could be detected and give the user a hint?\n\n----------------------------------------\n- Bitbucket: https://bitbucket.org/birkenfeld/sphinx/issue/1499\n- Originally reported by: [marciof](https://bitbucket.org/marciof)\n- Originally created at: 2014-06-28T09:35:55.767\n"},"comment":{"url":"https://api.github.com/repos/sphinx-doc/testing2/issues/comments/68589675","html_url":"https://github.com/sphinx-doc/testing2/issues/1499#issuecomment-68589675","issue_url":"https://api.github.com/repos/sphinx-doc/testing2/issues/1499","id":68589675,"user":{"login":"shimizukawa","id":151623,"avatar_url":"https://avatars.githubusercontent.com/u/151623?v=3","gravatar_id":"","url":"https://api.github.com/users/shimizukawa","html_url":"https://github.com/shimizukawa","followers_url":"https://api.github.com/users/shimizukawa/followers","following_url":"https://api.github.com/users/shimizukawa/following{/other_user}","gists_url":"https://api.github.com/users/shimizukawa/gists{/gist_id}","starred_url":"https://api.github.com/users/shimizukawa/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shimizukawa/subscriptions","organizations_url":"https://api.github.com/users/shimizukawa/orgs","repos_url":"https://api.github.com/users/shimizukawa/repos","events_url":"https://api.github.com/users/shimizukawa/events{/privacy}","received_events_url":"https://api.github.com/users/shimizukawa/received_events","type":"User","site_admin":false},"created_at":"2015-01-03T10:07:17Z","updated_at":"2015-01-03T10:07:17Z","body":"_From Takayuki Shimizukawa on 2014-06-30 13:57:11+00:00_\n\nBTW, I agree to [Markus Zapke-Gründemann](https://bitbucket.org/keimlink) opinion. `setup.py` shouldn't be imported from any other module."}}