{"action":"created","comment":{"url":"https://api.github.com/repos/checkmate/simpl/pulls/comments/32560152","id":32560152,"diff_hunk":"@@ -14,68 +14,54 @@\n # See the License for the specific language governing permissions and\n # limitations under the License.\n \n-\"\"\"simpl packaging and installation.\"\"\"\n+\"\"\"simpl packaging, installation, and package attributes.\"\"\"\n \n-import ast\n-import re\n+import os\n from setuptools import find_packages\n from setuptools import setup\n \n \n-DEPENDENCIES = [\n+src_dir = os.path.dirname(os.path.realpath(__file__))\n+\n+about = {}\n+with open(os.path.join(src_dir, 'simpl', '__about__.py')) as abt:\n+    exec(abt.read(), about)","path":"setup.py","position":19,"original_position":19,"commit_id":"4c73279f868ae7900cc9fbbaea7bb9b0ba00aa19","original_commit_id":"4c73279f868ae7900cc9fbbaea7bb9b0ba00aa19","user":{"login":"ziadsawalha","id":729918,"avatar_url":"https://avatars.githubusercontent.com/u/729918?v=3","gravatar_id":"","url":"https://api.github.com/users/ziadsawalha","html_url":"https://github.com/ziadsawalha","followers_url":"https://api.github.com/users/ziadsawalha/followers","following_url":"https://api.github.com/users/ziadsawalha/following{/other_user}","gists_url":"https://api.github.com/users/ziadsawalha/gists{/gist_id}","starred_url":"https://api.github.com/users/ziadsawalha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ziadsawalha/subscriptions","organizations_url":"https://api.github.com/users/ziadsawalha/orgs","repos_url":"https://api.github.com/users/ziadsawalha/repos","events_url":"https://api.github.com/users/ziadsawalha/events{/privacy}","received_events_url":"https://api.github.com/users/ziadsawalha/received_events","type":"User","site_admin":false},"body":"Would you consider something like the below instead of `exec`?\r\n\r\n```python\r\n\r\nimport ast\r\nimport os\r\nimport re\r\n\r\ndef package_meta():\r\n    \"\"\"Read __init__.py for global package metadata.\r\n\r\n    Do this without importing the package.\r\n    \"\"\"\r\n    _version_re = re.compile(r'__version__\\s+=\\s+(.*)')\r\n    _url_re = re.compile(r'__url__\\s+=\\s+(.*)')\r\n    _license_re = re.compile(r'__license__\\s+=\\s+(.*)')\r\n\r\n    with open(os.path.join('simpl', '__init__.py', 'rb') as initfile:\r\n        initcontent = initfile.read()\r\n        version = str(ast.literal_eval(_version_re.search(\r\n            initcontent.decode('utf-8')).group(1)))\r\n        url = str(ast.literal_eval(_url_re.search(\r\n            initcontent.decode('utf-8')).group(1)))\r\n        licencia = str(ast.literal_eval(_license_re.search(\r\n            initcontent.decode('utf-8')).group(1)))\r\n    return {\r\n        'version': version,\r\n        'license': licencia,\r\n        'url': url,\r\n    }\r\n```","created_at":"2015-06-16T19:23:05Z","updated_at":"2015-06-16T19:23:05Z","html_url":"https://github.com/checkmate/simpl/pull/25#discussion_r32560152","pull_request_url":"https://api.github.com/repos/checkmate/simpl/pulls/25","_links":{"self":{"href":"https://api.github.com/repos/checkmate/simpl/pulls/comments/32560152"},"html":{"href":"https://github.com/checkmate/simpl/pull/25#discussion_r32560152"},"pull_request":{"href":"https://api.github.com/repos/checkmate/simpl/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/checkmate/simpl/pulls/25","id":37814028,"html_url":"https://github.com/checkmate/simpl/pull/25","diff_url":"https://github.com/checkmate/simpl/pull/25.diff","patch_url":"https://github.com/checkmate/simpl/pull/25.patch","issue_url":"https://api.github.com/repos/checkmate/simpl/issues/25","number":25,"state":"open","locked":false,"title":"Package info simplification and reorganization","user":{"login":"samstav","id":2030182,"avatar_url":"https://avatars.githubusercontent.com/u/2030182?v=3","gravatar_id":"","url":"https://api.github.com/users/samstav","html_url":"https://github.com/samstav","followers_url":"https://api.github.com/users/samstav/followers","following_url":"https://api.github.com/users/samstav/following{/other_user}","gists_url":"https://api.github.com/users/samstav/gists{/gist_id}","starred_url":"https://api.github.com/users/samstav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samstav/subscriptions","organizations_url":"https://api.github.com/users/samstav/orgs","repos_url":"https://api.github.com/users/samstav/repos","events_url":"https://api.github.com/users/samstav/events{/privacy}","received_events_url":"https://api.github.com/users/samstav/received_events","type":"User","site_admin":false},"body":"Puts all package information into `simpl/__about__.py` for an improved layout and cleaner  `simpl/__init__.py` and `setup.py` \r\n\r\nThis PR bumps the version to `0.2.2` and I'll cut a release after. ","created_at":"2015-06-16T16:26:37Z","updated_at":"2015-06-16T19:23:05Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fd046f199d32b04b45037ab7e057ce0162ad9455","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/checkmate/simpl/pulls/25/commits","review_comments_url":"https://api.github.com/repos/checkmate/simpl/pulls/25/comments","review_comment_url":"https://api.github.com/repos/checkmate/simpl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/checkmate/simpl/issues/25/comments","statuses_url":"https://api.github.com/repos/checkmate/simpl/statuses/4c73279f868ae7900cc9fbbaea7bb9b0ba00aa19","head":{"label":"samstav:package-info-reorg","ref":"package-info-reorg","sha":"4c73279f868ae7900cc9fbbaea7bb9b0ba00aa19","user":{"login":"samstav","id":2030182,"avatar_url":"https://avatars.githubusercontent.com/u/2030182?v=3","gravatar_id":"","url":"https://api.github.com/users/samstav","html_url":"https://github.com/samstav","followers_url":"https://api.github.com/users/samstav/followers","following_url":"https://api.github.com/users/samstav/following{/other_user}","gists_url":"https://api.github.com/users/samstav/gists{/gist_id}","starred_url":"https://api.github.com/users/samstav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samstav/subscriptions","organizations_url":"https://api.github.com/users/samstav/orgs","repos_url":"https://api.github.com/users/samstav/repos","events_url":"https://api.github.com/users/samstav/events{/privacy}","received_events_url":"https://api.github.com/users/samstav/received_events","type":"User","site_admin":false},"repo":{"id":32089434,"name":"simpl","full_name":"samstav/simpl","owner":{"login":"samstav","id":2030182,"avatar_url":"https://avatars.githubusercontent.com/u/2030182?v=3","gravatar_id":"","url":"https://api.github.com/users/samstav","html_url":"https://github.com/samstav","followers_url":"https://api.github.com/users/samstav/followers","following_url":"https://api.github.com/users/samstav/following{/other_user}","gists_url":"https://api.github.com/users/samstav/gists{/gist_id}","starred_url":"https://api.github.com/users/samstav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samstav/subscriptions","organizations_url":"https://api.github.com/users/samstav/orgs","repos_url":"https://api.github.com/users/samstav/repos","events_url":"https://api.github.com/users/samstav/events{/privacy}","received_events_url":"https://api.github.com/users/samstav/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/samstav/simpl","description":"common libraries","fork":true,"url":"https://api.github.com/repos/samstav/simpl","forks_url":"https://api.github.com/repos/samstav/simpl/forks","keys_url":"https://api.github.com/repos/samstav/simpl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/samstav/simpl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/samstav/simpl/teams","hooks_url":"https://api.github.com/repos/samstav/simpl/hooks","issue_events_url":"https://api.github.com/repos/samstav/simpl/issues/events{/number}","events_url":"https://api.github.com/repos/samstav/simpl/events","assignees_url":"https://api.github.com/repos/samstav/simpl/assignees{/user}","branches_url":"https://api.github.com/repos/samstav/simpl/branches{/branch}","tags_url":"https://api.github.com/repos/samstav/simpl/tags","blobs_url":"https://api.github.com/repos/samstav/simpl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/samstav/simpl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/samstav/simpl/git/refs{/sha}","trees_url":"https://api.github.com/repos/samstav/simpl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/samstav/simpl/statuses/{sha}","languages_url":"https://api.github.com/repos/samstav/simpl/languages","stargazers_url":"https://api.github.com/repos/samstav/simpl/stargazers","contributors_url":"https://api.github.com/repos/samstav/simpl/contributors","subscribers_url":"https://api.github.com/repos/samstav/simpl/subscribers","subscription_url":"https://api.github.com/repos/samstav/simpl/subscription","commits_url":"https://api.github.com/repos/samstav/simpl/commits{/sha}","git_commits_url":"https://api.github.com/repos/samstav/simpl/git/commits{/sha}","comments_url":"https://api.github.com/repos/samstav/simpl/comments{/number}","issue_comment_url":"https://api.github.com/repos/samstav/simpl/issues/comments{/number}","contents_url":"https://api.github.com/repos/samstav/simpl/contents/{+path}","compare_url":"https://api.github.com/repos/samstav/simpl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/samstav/simpl/merges","archive_url":"https://api.github.com/repos/samstav/simpl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/samstav/simpl/downloads","issues_url":"https://api.github.com/repos/samstav/simpl/issues{/number}","pulls_url":"https://api.github.com/repos/samstav/simpl/pulls{/number}","milestones_url":"https://api.github.com/repos/samstav/simpl/milestones{/number}","notifications_url":"https://api.github.com/repos/samstav/simpl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/samstav/simpl/labels{/name}","releases_url":"https://api.github.com/repos/samstav/simpl/releases{/id}","created_at":"2015-03-12T16:57:02Z","updated_at":"2015-05-06T00:01:58Z","pushed_at":"2015-06-16T18:35:33Z","git_url":"git://github.com/samstav/simpl.git","ssh_url":"git@github.com:samstav/simpl.git","clone_url":"https://github.com/samstav/simpl.git","svn_url":"https://github.com/samstav/simpl","homepage":null,"size":360,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"checkmate:master","ref":"master","sha":"1a4cb60a749df728d75eaf1b7978b020dd4204ba","user":{"login":"checkmate","id":2694892,"avatar_url":"https://avatars.githubusercontent.com/u/2694892?v=3","gravatar_id":"","url":"https://api.github.com/users/checkmate","html_url":"https://github.com/checkmate","followers_url":"https://api.github.com/users/checkmate/followers","following_url":"https://api.github.com/users/checkmate/following{/other_user}","gists_url":"https://api.github.com/users/checkmate/gists{/gist_id}","starred_url":"https://api.github.com/users/checkmate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/checkmate/subscriptions","organizations_url":"https://api.github.com/users/checkmate/orgs","repos_url":"https://api.github.com/users/checkmate/repos","events_url":"https://api.github.com/users/checkmate/events{/privacy}","received_events_url":"https://api.github.com/users/checkmate/received_events","type":"Organization","site_admin":false},"repo":{"id":32089421,"name":"simpl","full_name":"checkmate/simpl","owner":{"login":"checkmate","id":2694892,"avatar_url":"https://avatars.githubusercontent.com/u/2694892?v=3","gravatar_id":"","url":"https://api.github.com/users/checkmate","html_url":"https://github.com/checkmate","followers_url":"https://api.github.com/users/checkmate/followers","following_url":"https://api.github.com/users/checkmate/following{/other_user}","gists_url":"https://api.github.com/users/checkmate/gists{/gist_id}","starred_url":"https://api.github.com/users/checkmate/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/checkmate/subscriptions","organizations_url":"https://api.github.com/users/checkmate/orgs","repos_url":"https://api.github.com/users/checkmate/repos","events_url":"https://api.github.com/users/checkmate/events{/privacy}","received_events_url":"https://api.github.com/users/checkmate/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/checkmate/simpl","description":"common python libraries","fork":false,"url":"https://api.github.com/repos/checkmate/simpl","forks_url":"https://api.github.com/repos/checkmate/simpl/forks","keys_url":"https://api.github.com/repos/checkmate/simpl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/checkmate/simpl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/checkmate/simpl/teams","hooks_url":"https://api.github.com/repos/checkmate/simpl/hooks","issue_events_url":"https://api.github.com/repos/checkmate/simpl/issues/events{/number}","events_url":"https://api.github.com/repos/checkmate/simpl/events","assignees_url":"https://api.github.com/repos/checkmate/simpl/assignees{/user}","branches_url":"https://api.github.com/repos/checkmate/simpl/branches{/branch}","tags_url":"https://api.github.com/repos/checkmate/simpl/tags","blobs_url":"https://api.github.com/repos/checkmate/simpl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/checkmate/simpl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/checkmate/simpl/git/refs{/sha}","trees_url":"https://api.github.com/repos/checkmate/simpl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/checkmate/simpl/statuses/{sha}","languages_url":"https://api.github.com/repos/checkmate/simpl/languages","stargazers_url":"https://api.github.com/repos/checkmate/simpl/stargazers","contributors_url":"https://api.github.com/repos/checkmate/simpl/contributors","subscribers_url":"https://api.github.com/repos/checkmate/simpl/subscribers","subscription_url":"https://api.github.com/repos/checkmate/simpl/subscription","commits_url":"https://api.github.com/repos/checkmate/simpl/commits{/sha}","git_commits_url":"https://api.github.com/repos/checkmate/simpl/git/commits{/sha}","comments_url":"https://api.github.com/repos/checkmate/simpl/comments{/number}","issue_comment_url":"https://api.github.com/repos/checkmate/simpl/issues/comments{/number}","contents_url":"https://api.github.com/repos/checkmate/simpl/contents/{+path}","compare_url":"https://api.github.com/repos/checkmate/simpl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/checkmate/simpl/merges","archive_url":"https://api.github.com/repos/checkmate/simpl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/checkmate/simpl/downloads","issues_url":"https://api.github.com/repos/checkmate/simpl/issues{/number}","pulls_url":"https://api.github.com/repos/checkmate/simpl/pulls{/number}","milestones_url":"https://api.github.com/repos/checkmate/simpl/milestones{/number}","notifications_url":"https://api.github.com/repos/checkmate/simpl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/checkmate/simpl/labels{/name}","releases_url":"https://api.github.com/repos/checkmate/simpl/releases{/id}","created_at":"2015-03-12T16:56:55Z","updated_at":"2015-05-08T00:15:34Z","pushed_at":"2015-06-16T16:50:49Z","git_url":"git://github.com/checkmate/simpl.git","ssh_url":"git@github.com:checkmate/simpl.git","clone_url":"https://github.com/checkmate/simpl.git","svn_url":"https://github.com/checkmate/simpl","homepage":"","size":400,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":9,"forks":5,"open_issues":9,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/checkmate/simpl/pulls/25"},"html":{"href":"https://github.com/checkmate/simpl/pull/25"},"issue":{"href":"https://api.github.com/repos/checkmate/simpl/issues/25"},"comments":{"href":"https://api.github.com/repos/checkmate/simpl/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/checkmate/simpl/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/checkmate/simpl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/checkmate/simpl/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/checkmate/simpl/statuses/4c73279f868ae7900cc9fbbaea7bb9b0ba00aa19"}}}}