{"action":"created","comment":{"url":"https://api.github.com/repos/pyca/pyopenssl/pulls/comments/42286492","id":42286492,"diff_hunk":"@@ -46,82 +44,45 @@ def find_meta(meta):\n     raise RuntimeError(\"Unable to find __{meta}__ string.\".format(meta=meta))\n \n \n-class PyTest(TestCommand):\n-    user_options = [(\"pytest-args=\", \"a\", \"Arguments to pass to py.test\")]\n-\n-    def initialize_options(self):\n-        TestCommand.initialize_options(self)\n-        self.pytest_args = None\n-\n-    def finalize_options(self):\n-        TestCommand.finalize_options(self)\n-        self.test_args = []\n-        self.test_suite = True\n-\n-    def run_tests(self):\n-        # import here, cause outside the eggs aren't loaded\n-        import pytest\n-        errno = pytest.main(self.pytest_args or [] +\n-                            [\"OpenSSL\"])\n-        sys.exit(errno)\n-\n-\n-setup(\n-    name=find_meta(\"title\"),\n-    version=find_meta(\"version\"),\n-    description=find_meta(\"summary\"),\n-    long_description=read_file(\"README.rst\"),\n-    author=find_meta(\"author\"),\n-    author_email=find_meta(\"email\"),\n-    maintainer=\"Hynek Schlawack\",\n-    maintainer_email=\"hs@ox.cx\",\n-    url=find_meta(\"uri\"),\n-    license=find_meta(\"license\"),\n-    classifiers=[\n-        'Development Status :: 6 - Mature',\n-        'Intended Audience :: Developers',\n-        'License :: OSI Approved :: Apache Software License',\n-        'Operating System :: MacOS :: MacOS X',\n-        'Operating System :: Microsoft :: Windows',\n-        'Operating System :: POSIX',\n-\n-        'Programming Language :: Python :: 2',\n-        'Programming Language :: Python :: 2.6',\n-        'Programming Language :: Python :: 2.7',\n-        'Programming Language :: Python :: 3',\n-        'Programming Language :: Python :: 3.3',\n-\n-        'Programming Language :: Python :: Implementation :: CPython',\n-        'Programming Language :: Python :: Implementation :: PyPy',\n-        'Topic :: Security :: Cryptography',\n-        'Topic :: Software Development :: Libraries :: Python Modules',\n-        'Topic :: System :: Networking',\n-    ],\n-\n-    packages=['OpenSSL'],\n-    package_dir={'OpenSSL': 'OpenSSL'},\n-    py_modules=['OpenSSL.__init__',\n-                'OpenSSL.tsafe',\n-                'OpenSSL.rand',\n-                'OpenSSL.crypto',\n-                'OpenSSL.SSL',\n-                'OpenSSL.version',\n-                'OpenSSL.test.__init__',\n-                'OpenSSL.test.util',\n-                'OpenSSL.test.test_crypto',\n-                'OpenSSL.test.test_rand',\n-                'OpenSSL.test.test_ssl',\n-                'OpenSSL.test.test_tsafe',\n-                'OpenSSL.test.test_util',],\n-    install_requires=[\n-        \"cryptography>=0.7\",\n-        \"six>=1.5.2\"\n-    ],\n-    test_suite=\"OpenSSL\",\n-    tests_require=[\n-        \"pytest\",\n-    ],\n-    cmdclass={\n-        \"test\": PyTest,\n-    }\n-)\n+if __name__ == \"__main__\":","path":"setup.py","position":100,"original_position":100,"commit_id":"e054de1a0040d05af3986a94b107db57b476cef5","original_commit_id":"e054de1a0040d05af3986a94b107db57b476cef5","user":{"login":"reaperhulk","id":161495,"avatar_url":"https://avatars.githubusercontent.com/u/161495?v=3","gravatar_id":"","url":"https://api.github.com/users/reaperhulk","html_url":"https://github.com/reaperhulk","followers_url":"https://api.github.com/users/reaperhulk/followers","following_url":"https://api.github.com/users/reaperhulk/following{/other_user}","gists_url":"https://api.github.com/users/reaperhulk/gists{/gist_id}","starred_url":"https://api.github.com/users/reaperhulk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reaperhulk/subscriptions","organizations_url":"https://api.github.com/users/reaperhulk/orgs","repos_url":"https://api.github.com/users/reaperhulk/repos","events_url":"https://api.github.com/users/reaperhulk/events{/privacy}","received_events_url":"https://api.github.com/users/reaperhulk/received_events","type":"User","site_admin":false},"body":"Speaking as someone ignorant of the true mysteries of setup.py, what's the advantage of doing this?","created_at":"2015-10-16T20:29:31Z","updated_at":"2015-10-16T20:29:31Z","html_url":"https://github.com/pyca/pyopenssl/pull/371#discussion_r42286492","pull_request_url":"https://api.github.com/repos/pyca/pyopenssl/pulls/371","_links":{"self":{"href":"https://api.github.com/repos/pyca/pyopenssl/pulls/comments/42286492"},"html":{"href":"https://github.com/pyca/pyopenssl/pull/371#discussion_r42286492"},"pull_request":{"href":"https://api.github.com/repos/pyca/pyopenssl/pulls/371"}}},"pull_request":{"url":"https://api.github.com/repos/pyca/pyopenssl/pulls/371","id":47946554,"html_url":"https://github.com/pyca/pyopenssl/pull/371","diff_url":"https://github.com/pyca/pyopenssl/pull/371.diff","patch_url":"https://github.com/pyca/pyopenssl/pull/371.patch","issue_url":"https://api.github.com/repos/pyca/pyopenssl/issues/371","number":371,"state":"open","locked":false,"title":"Move package into src","user":{"login":"hynek","id":41240,"avatar_url":"https://avatars.githubusercontent.com/u/41240?v=3","gravatar_id":"","url":"https://api.github.com/users/hynek","html_url":"https://github.com/hynek","followers_url":"https://api.github.com/users/hynek/followers","following_url":"https://api.github.com/users/hynek/following{/other_user}","gists_url":"https://api.github.com/users/hynek/gists{/gist_id}","starred_url":"https://api.github.com/users/hynek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hynek/subscriptions","organizations_url":"https://api.github.com/users/hynek/orgs","repos_url":"https://api.github.com/users/hynek/repos","events_url":"https://api.github.com/users/hynek/events{/privacy}","received_events_url":"https://api.github.com/users/hynek/received_events","type":"User","site_admin":false},"body":"So, I don’t want to push this through so it’s more of an RFC and I would like it only merged if both @alex and @reaperhulk agree.\r\n\r\nWe have a lot of pain with heisenbugs and packaging weirdnesses so this PR cleans the structure up to PyCA standards:\r\n\r\n- it moves the package into a src directory so it’s not accidentally imported when running tests (and the `pip install -e .` ’ed version is used)\r\n- it moves the test directory out of the package because I find that terrible style with nothing but downsides (you can perfectly run separate tests in production; you even get the assurance that they are testing code within site-packages)\r\n- I have *no* idea how to use `runtests.py` since it only fails for me.  I feel like we should get rid of it, but how does one do memory debugging?  But that’s for another day.\r\n- These changes also enable us to collect coverage over the whole tox run so you get your local codecov everyone always dreamed of.\r\n\r\nLet me know what you think.","created_at":"2015-10-16T18:51:42Z","updated_at":"2015-10-16T20:29:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0b82276b5ebc36d2e38c5cd198b1fb6f5d92678f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/pyca/pyopenssl/pulls/371/commits","review_comments_url":"https://api.github.com/repos/pyca/pyopenssl/pulls/371/comments","review_comment_url":"https://api.github.com/repos/pyca/pyopenssl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pyca/pyopenssl/issues/371/comments","statuses_url":"https://api.github.com/repos/pyca/pyopenssl/statuses/e054de1a0040d05af3986a94b107db57b476cef5","head":{"label":"hynek:move-to-src","ref":"move-to-src","sha":"e054de1a0040d05af3986a94b107db57b476cef5","user":{"login":"hynek","id":41240,"avatar_url":"https://avatars.githubusercontent.com/u/41240?v=3","gravatar_id":"","url":"https://api.github.com/users/hynek","html_url":"https://github.com/hynek","followers_url":"https://api.github.com/users/hynek/followers","following_url":"https://api.github.com/users/hynek/following{/other_user}","gists_url":"https://api.github.com/users/hynek/gists{/gist_id}","starred_url":"https://api.github.com/users/hynek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hynek/subscriptions","organizations_url":"https://api.github.com/users/hynek/orgs","repos_url":"https://api.github.com/users/hynek/repos","events_url":"https://api.github.com/users/hynek/events{/privacy}","received_events_url":"https://api.github.com/users/hynek/received_events","type":"User","site_admin":false},"repo":{"id":33905859,"name":"pyopenssl","full_name":"hynek/pyopenssl","owner":{"login":"hynek","id":41240,"avatar_url":"https://avatars.githubusercontent.com/u/41240?v=3","gravatar_id":"","url":"https://api.github.com/users/hynek","html_url":"https://github.com/hynek","followers_url":"https://api.github.com/users/hynek/followers","following_url":"https://api.github.com/users/hynek/following{/other_user}","gists_url":"https://api.github.com/users/hynek/gists{/gist_id}","starred_url":"https://api.github.com/users/hynek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hynek/subscriptions","organizations_url":"https://api.github.com/users/hynek/orgs","repos_url":"https://api.github.com/users/hynek/repos","events_url":"https://api.github.com/users/hynek/events{/privacy}","received_events_url":"https://api.github.com/users/hynek/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hynek/pyopenssl","description":"Python interface to the OpenSSL library","fork":true,"url":"https://api.github.com/repos/hynek/pyopenssl","forks_url":"https://api.github.com/repos/hynek/pyopenssl/forks","keys_url":"https://api.github.com/repos/hynek/pyopenssl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hynek/pyopenssl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hynek/pyopenssl/teams","hooks_url":"https://api.github.com/repos/hynek/pyopenssl/hooks","issue_events_url":"https://api.github.com/repos/hynek/pyopenssl/issues/events{/number}","events_url":"https://api.github.com/repos/hynek/pyopenssl/events","assignees_url":"https://api.github.com/repos/hynek/pyopenssl/assignees{/user}","branches_url":"https://api.github.com/repos/hynek/pyopenssl/branches{/branch}","tags_url":"https://api.github.com/repos/hynek/pyopenssl/tags","blobs_url":"https://api.github.com/repos/hynek/pyopenssl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hynek/pyopenssl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hynek/pyopenssl/git/refs{/sha}","trees_url":"https://api.github.com/repos/hynek/pyopenssl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hynek/pyopenssl/statuses/{sha}","languages_url":"https://api.github.com/repos/hynek/pyopenssl/languages","stargazers_url":"https://api.github.com/repos/hynek/pyopenssl/stargazers","contributors_url":"https://api.github.com/repos/hynek/pyopenssl/contributors","subscribers_url":"https://api.github.com/repos/hynek/pyopenssl/subscribers","subscription_url":"https://api.github.com/repos/hynek/pyopenssl/subscription","commits_url":"https://api.github.com/repos/hynek/pyopenssl/commits{/sha}","git_commits_url":"https://api.github.com/repos/hynek/pyopenssl/git/commits{/sha}","comments_url":"https://api.github.com/repos/hynek/pyopenssl/comments{/number}","issue_comment_url":"https://api.github.com/repos/hynek/pyopenssl/issues/comments{/number}","contents_url":"https://api.github.com/repos/hynek/pyopenssl/contents/{+path}","compare_url":"https://api.github.com/repos/hynek/pyopenssl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hynek/pyopenssl/merges","archive_url":"https://api.github.com/repos/hynek/pyopenssl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hynek/pyopenssl/downloads","issues_url":"https://api.github.com/repos/hynek/pyopenssl/issues{/number}","pulls_url":"https://api.github.com/repos/hynek/pyopenssl/pulls{/number}","milestones_url":"https://api.github.com/repos/hynek/pyopenssl/milestones{/number}","notifications_url":"https://api.github.com/repos/hynek/pyopenssl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hynek/pyopenssl/labels{/name}","releases_url":"https://api.github.com/repos/hynek/pyopenssl/releases{/id}","created_at":"2015-04-14T02:19:35Z","updated_at":"2015-05-06T13:48:01Z","pushed_at":"2015-10-16T19:06:28Z","git_url":"git://github.com/hynek/pyopenssl.git","ssh_url":"git@github.com:hynek/pyopenssl.git","clone_url":"https://github.com/hynek/pyopenssl.git","svn_url":"https://github.com/hynek/pyopenssl","homepage":null,"size":10691,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pyca:master","ref":"master","sha":"ecbcde659557b6951ec3e1346b39499f8a9e9c18","user":{"login":"pyca","id":5615737,"avatar_url":"https://avatars.githubusercontent.com/u/5615737?v=3","gravatar_id":"","url":"https://api.github.com/users/pyca","html_url":"https://github.com/pyca","followers_url":"https://api.github.com/users/pyca/followers","following_url":"https://api.github.com/users/pyca/following{/other_user}","gists_url":"https://api.github.com/users/pyca/gists{/gist_id}","starred_url":"https://api.github.com/users/pyca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyca/subscriptions","organizations_url":"https://api.github.com/users/pyca/orgs","repos_url":"https://api.github.com/users/pyca/repos","events_url":"https://api.github.com/users/pyca/events{/privacy}","received_events_url":"https://api.github.com/users/pyca/received_events","type":"Organization","site_admin":false},"repo":{"id":15778059,"name":"pyopenssl","full_name":"pyca/pyopenssl","owner":{"login":"pyca","id":5615737,"avatar_url":"https://avatars.githubusercontent.com/u/5615737?v=3","gravatar_id":"","url":"https://api.github.com/users/pyca","html_url":"https://github.com/pyca","followers_url":"https://api.github.com/users/pyca/followers","following_url":"https://api.github.com/users/pyca/following{/other_user}","gists_url":"https://api.github.com/users/pyca/gists{/gist_id}","starred_url":"https://api.github.com/users/pyca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyca/subscriptions","organizations_url":"https://api.github.com/users/pyca/orgs","repos_url":"https://api.github.com/users/pyca/repos","events_url":"https://api.github.com/users/pyca/events{/privacy}","received_events_url":"https://api.github.com/users/pyca/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pyca/pyopenssl","description":"A Python wrapper around the OpenSSL library","fork":false,"url":"https://api.github.com/repos/pyca/pyopenssl","forks_url":"https://api.github.com/repos/pyca/pyopenssl/forks","keys_url":"https://api.github.com/repos/pyca/pyopenssl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pyca/pyopenssl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pyca/pyopenssl/teams","hooks_url":"https://api.github.com/repos/pyca/pyopenssl/hooks","issue_events_url":"https://api.github.com/repos/pyca/pyopenssl/issues/events{/number}","events_url":"https://api.github.com/repos/pyca/pyopenssl/events","assignees_url":"https://api.github.com/repos/pyca/pyopenssl/assignees{/user}","branches_url":"https://api.github.com/repos/pyca/pyopenssl/branches{/branch}","tags_url":"https://api.github.com/repos/pyca/pyopenssl/tags","blobs_url":"https://api.github.com/repos/pyca/pyopenssl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pyca/pyopenssl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pyca/pyopenssl/git/refs{/sha}","trees_url":"https://api.github.com/repos/pyca/pyopenssl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pyca/pyopenssl/statuses/{sha}","languages_url":"https://api.github.com/repos/pyca/pyopenssl/languages","stargazers_url":"https://api.github.com/repos/pyca/pyopenssl/stargazers","contributors_url":"https://api.github.com/repos/pyca/pyopenssl/contributors","subscribers_url":"https://api.github.com/repos/pyca/pyopenssl/subscribers","subscription_url":"https://api.github.com/repos/pyca/pyopenssl/subscription","commits_url":"https://api.github.com/repos/pyca/pyopenssl/commits{/sha}","git_commits_url":"https://api.github.com/repos/pyca/pyopenssl/git/commits{/sha}","comments_url":"https://api.github.com/repos/pyca/pyopenssl/comments{/number}","issue_comment_url":"https://api.github.com/repos/pyca/pyopenssl/issues/comments{/number}","contents_url":"https://api.github.com/repos/pyca/pyopenssl/contents/{+path}","compare_url":"https://api.github.com/repos/pyca/pyopenssl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pyca/pyopenssl/merges","archive_url":"https://api.github.com/repos/pyca/pyopenssl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pyca/pyopenssl/downloads","issues_url":"https://api.github.com/repos/pyca/pyopenssl/issues{/number}","pulls_url":"https://api.github.com/repos/pyca/pyopenssl/pulls{/number}","milestones_url":"https://api.github.com/repos/pyca/pyopenssl/milestones{/number}","notifications_url":"https://api.github.com/repos/pyca/pyopenssl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pyca/pyopenssl/labels{/name}","releases_url":"https://api.github.com/repos/pyca/pyopenssl/releases{/id}","created_at":"2014-01-09T20:10:36Z","updated_at":"2015-10-13T04:35:35Z","pushed_at":"2015-10-16T19:06:29Z","git_url":"git://github.com/pyca/pyopenssl.git","ssh_url":"git@github.com:pyca/pyopenssl.git","clone_url":"https://github.com/pyca/pyopenssl.git","svn_url":"https://github.com/pyca/pyopenssl","homepage":"https://pyopenssl.readthedocs.org/","size":12283,"stargazers_count":207,"watchers_count":207,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":149,"mirror_url":null,"open_issues_count":90,"forks":149,"open_issues":90,"watchers":207,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pyca/pyopenssl/pulls/371"},"html":{"href":"https://github.com/pyca/pyopenssl/pull/371"},"issue":{"href":"https://api.github.com/repos/pyca/pyopenssl/issues/371"},"comments":{"href":"https://api.github.com/repos/pyca/pyopenssl/issues/371/comments"},"review_comments":{"href":"https://api.github.com/repos/pyca/pyopenssl/pulls/371/comments"},"review_comment":{"href":"https://api.github.com/repos/pyca/pyopenssl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pyca/pyopenssl/pulls/371/commits"},"statuses":{"href":"https://api.github.com/repos/pyca/pyopenssl/statuses/e054de1a0040d05af3986a94b107db57b476cef5"}}}}