{"action":"created","issue":{"url":"https://api.github.com/repos/aquynh/capstone/issues/221","labels_url":"https://api.github.com/repos/aquynh/capstone/issues/221/labels{/name}","comments_url":"https://api.github.com/repos/aquynh/capstone/issues/221/comments","events_url":"https://api.github.com/repos/aquynh/capstone/issues/221/events","html_url":"https://github.com/aquynh/capstone/pull/221","id":48932950,"number":221,"title":"Updated setup.py so it can build the capstone library by itself.","user":{"login":"scudette","id":3856546,"avatar_url":"https://avatars.githubusercontent.com/u/3856546?v=3","gravatar_id":"","url":"https://api.github.com/users/scudette","html_url":"https://github.com/scudette","followers_url":"https://api.github.com/users/scudette/followers","following_url":"https://api.github.com/users/scudette/following{/other_user}","gists_url":"https://api.github.com/users/scudette/gists{/gist_id}","starred_url":"https://api.github.com/users/scudette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scudette/subscriptions","organizations_url":"https://api.github.com/users/scudette/orgs","repos_url":"https://api.github.com/users/scudette/repos","events_url":"https://api.github.com/users/scudette/events{/privacy}","received_events_url":"https://api.github.com/users/scudette/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":12,"created_at":"2014-11-15T21:16:26Z","updated_at":"2015-01-27T00:07:00Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/aquynh/capstone/pulls/221","html_url":"https://github.com/aquynh/capstone/pull/221","diff_url":"https://github.com/aquynh/capstone/pull/221.diff","patch_url":"https://github.com/aquynh/capstone/pull/221.patch"},"body":"This is a requirement for an automated install via pip. After this change it\r\nshould be possible to depend on captone in pip and have it built automatically."},"comment":{"url":"https://api.github.com/repos/aquynh/capstone/issues/comments/71565427","html_url":"https://github.com/aquynh/capstone/pull/221#issuecomment-71565427","issue_url":"https://api.github.com/repos/aquynh/capstone/issues/221","id":71565427,"user":{"login":"scudette","id":3856546,"avatar_url":"https://avatars.githubusercontent.com/u/3856546?v=3","gravatar_id":"","url":"https://api.github.com/users/scudette","html_url":"https://github.com/scudette","followers_url":"https://api.github.com/users/scudette/followers","following_url":"https://api.github.com/users/scudette/following{/other_user}","gists_url":"https://api.github.com/users/scudette/gists{/gist_id}","starred_url":"https://api.github.com/users/scudette/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/scudette/subscriptions","organizations_url":"https://api.github.com/users/scudette/orgs","repos_url":"https://api.github.com/users/scudette/repos","events_url":"https://api.github.com/users/scudette/events{/privacy}","received_events_url":"https://api.github.com/users/scudette/received_events","type":"User","site_admin":false},"created_at":"2015-01-27T00:07:00Z","updated_at":"2015-01-27T00:07:00Z","body":"That is strange as I tested on a Yosemite box and it worked fine. The issue\r\nis that the pip package must carry everything it needs with it. Since the C\r\ncode is not well contained in its own directory, we need to copy files\r\ncarefully into the ./src/ directory in such a way that we could run make.sh\r\nafter we package it. It will be a lot of work and also be error prone as we\r\nneed to maintain the mapping between the original source tree and the tree\r\ndistributed in the sdist. (Maybe a future cleanup of the c code will help\r\nthis issue - like creating an isolated /src/ directory at the top level.).\r\n\r\nIn addition we need to rewrite make.sh as a batch file since windows does\r\nnot have bash or indeed make at all for the pip package to be compiled on\r\nwindows. This will be even harder to maintain. Setup tools is designed to\r\nbuild python modules and somewhat designed to build simple C libraries.\r\nConsidering how simple the make.sh file is I dont see a point in the added\r\ncomplexity of trying to incorporate it into the python build process.\r\n\r\nCan you please indicate which compiler options are missing on darwin? What\r\nis the difference between the options invoked through the make file and\r\nthose through the python bindings?\r\n\r\nThanks\r\nMichael.\r\n\r\nOn 27 January 2015 at 00:41, Nguyen Anh Quynh <notifications@github.com>\r\nwrote:\r\n\r\n> currently your approach is trying to duplicate this work, and as a result,\r\n> on my Yosemite OSX the core cannot be compiled due to (it seems) some wrong\r\n> compiler flags.\r\n>\r\n> i think it is simpler & cleaner to just execute make.sh to compile the\r\n> core: make.sh already know all the compiler setup & would take care all\r\n> all the platforms (OSX, Linux, *BSD, etc) to generate the right library\r\n> (.dylib or .so).\r\n>\r\n> —\r\n> Reply to this email directly or view it on GitHub\r\n> <https://github.com/aquynh/capstone/pull/221#issuecomment-71562429>.\r\n>"}}