{"action":"created","issue":{"url":"https://api.github.com/repos/aquynh/capstone/issues/590","repository_url":"https://api.github.com/repos/aquynh/capstone","labels_url":"https://api.github.com/repos/aquynh/capstone/issues/590/labels{/name}","comments_url":"https://api.github.com/repos/aquynh/capstone/issues/590/comments","events_url":"https://api.github.com/repos/aquynh/capstone/issues/590/events","html_url":"https://github.com/aquynh/capstone/pull/590","id":133601997,"number":590,"title":"Fix setup.py to use setuptools and put the libcapstone.so in the right place.","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":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-02-15T01:39:15Z","updated_at":"2016-03-12T18:15:03Z","closed_at":"2016-02-15T14:31:44Z","pull_request":{"url":"https://api.github.com/repos/aquynh/capstone/pulls/590","html_url":"https://github.com/aquynh/capstone/pull/590","diff_url":"https://github.com/aquynh/capstone/pull/590.diff","patch_url":"https://github.com/aquynh/capstone/pull/590.patch"},"body":"This fixes  #588 and possibly also #583. It seems that more recent setuptools do not like to place files outside the installed package with the data_files directive. So it is better to use the package_data directive to ensure the shared objects end up inside the package. \r\n\r\nThis change also allows creating a wheel:\r\n```\r\n$ python setup.py bdist_wheel\r\n....\r\nCopying capstone.egg-info to build/bdist.linux-x86_64/wheel/capstone-3.0.4.data/purelib/capstone-3.0.4-py2.7.egg-info\r\nrunning install_scripts\r\ncreating build/bdist.linux-x86_64/wheel/capstone-3.0.4.dist-info/WHEEL\r\n$ ls dist/\r\ncapstone-3.0.4-cp27-none-linux_x86_64.whl  capstone-3.0.4-py2.7.egg  capstone-3.0.4.tar.gz\r\n$ unzip -l dist/capstone-3.0.4-cp27-none-linux_x86_64.whl\r\nArchive:  dist/capstone-3.0.4-cp27-none-linux_x86_64.whl\r\n  Length      Date    Time    Name\r\n---------  ---------- -----   ----\r\n     1036  2014-11-14 16:04   capstone-3.0.4.data/purelib/capstone/systemz.py\r\n...\r\n    22523  2015-10-23 23:04   capstone-3.0.4.data/purelib/capstone/arm64_const.py\r\n  2914397  2016-02-11 17:19   capstone-3.0.4.data/purelib/capstone/libcapstone.so   <---- the so ends up here.\r\n     9552  2015-10-23 23:04   capstone-3.0.4.data/purelib/capstone/sparc_const.py \r\n...\r\n      416  2016-02-11 23:50   capstone-3.0.4.dist-info/METADATA\r\n     4217  2016-02-11 23:50   capstone-3.0.4.dist-info/RECORD\r\n---------                     -------\r\n  3351047                     41 files\r\n```\r\n\r\nAs you can see the .so or dll ends up in the binary wheel. You can now easily upload them to pypi:\r\n```\r\n$ pip install twine\r\n$ twine upload dist/capstone-3.0.4-cp27-none-linux_x86_64.whl \r\n```\r\n\r\nPyPi currently does not support linux wheels but windows and OSX wheels can be uploaded. This allows users of those systems to just use the binary dist without needing to build and maybe we dont need the capstone-windows package any more.\r\n"},"comment":{"url":"https://api.github.com/repos/aquynh/capstone/issues/comments/195782516","html_url":"https://github.com/aquynh/capstone/pull/590#issuecomment-195782516","issue_url":"https://api.github.com/repos/aquynh/capstone/issues/590","id":195782516,"user":{"login":"aquynh","id":5965536,"avatar_url":"https://avatars.githubusercontent.com/u/5965536?v=3","gravatar_id":"","url":"https://api.github.com/users/aquynh","html_url":"https://github.com/aquynh","followers_url":"https://api.github.com/users/aquynh/followers","following_url":"https://api.github.com/users/aquynh/following{/other_user}","gists_url":"https://api.github.com/users/aquynh/gists{/gist_id}","starred_url":"https://api.github.com/users/aquynh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aquynh/subscriptions","organizations_url":"https://api.github.com/users/aquynh/orgs","repos_url":"https://api.github.com/users/aquynh/repos","events_url":"https://api.github.com/users/aquynh/events{/privacy}","received_events_url":"https://api.github.com/users/aquynh/received_events","type":"User","site_admin":false},"created_at":"2016-03-12T18:15:03Z","updated_at":"2016-03-12T18:15:03Z","body":"do you have any update on this?"}}