{"action":"created","issue":{"url":"https://api.github.com/repos/Z3Prover/z3/issues/288","labels_url":"https://api.github.com/repos/Z3Prover/z3/issues/288/labels{/name}","comments_url":"https://api.github.com/repos/Z3Prover/z3/issues/288/comments","events_url":"https://api.github.com/repos/Z3Prover/z3/issues/288/events","html_url":"https://github.com/Z3Prover/z3/issues/288","id":114824585,"number":288,"title":"Pythonic installation support","user":{"login":"wintersteiger","id":10155819,"avatar_url":"https://avatars.githubusercontent.com/u/10155819?v=3","gravatar_id":"","url":"https://api.github.com/users/wintersteiger","html_url":"https://github.com/wintersteiger","followers_url":"https://api.github.com/users/wintersteiger/followers","following_url":"https://api.github.com/users/wintersteiger/following{/other_user}","gists_url":"https://api.github.com/users/wintersteiger/gists{/gist_id}","starred_url":"https://api.github.com/users/wintersteiger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wintersteiger/subscriptions","organizations_url":"https://api.github.com/users/wintersteiger/orgs","repos_url":"https://api.github.com/users/wintersteiger/repos","events_url":"https://api.github.com/users/wintersteiger/events{/privacy}","received_events_url":"https://api.github.com/users/wintersteiger/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Z3Prover/z3/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/Z3Prover/z3/labels/help%20wanted","name":"help wanted","color":"159818"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-11-03T14:07:37Z","updated_at":"2015-12-18T05:53:02Z","closed_at":null,"body":"Restarting the discussion about packages for the Python Z3 API. A previous PR was automatically closed when the unstable branch was removed. Users @zardus, @asmeurer, @zachriggle, @musically-ut, @cao were involved in the discussion.\r\n\r\nI understand that the previously crafted scripts were able to install the Z3 package for at least some Linux Python installations, but there were problems with other platforms, at least with Windows. \r\n\r\nThere was also the question of where to put the packaging scripts; I don't want them in the project root because then we'll have to follow suit for all other package managers and it seems that other projects do indeed store them elsewhere (e.g., [Pip install fails to install dependency when setup.py not in root directory](http://stackoverflow.com/questions/26542288/pip-install-fails-to-install-dependency-when-setup-py-not-in-root-directory)).\r\n\r\nIn the meanwhile, all existing Python scripts have been updated to work with both Python 2.x and 3.x, so that should simplify some of the remaining tasks I hope.\r\n\r\nDoes anybody know a Python expert who could help us out with setting up the scripts/packages?"},"comment":{"url":"https://api.github.com/repos/Z3Prover/z3/issues/comments/165679978","html_url":"https://github.com/Z3Prover/z3/issues/288#issuecomment-165679978","issue_url":"https://api.github.com/repos/Z3Prover/z3/issues/288","id":165679978,"user":{"login":"cao","id":4066561,"avatar_url":"https://avatars.githubusercontent.com/u/4066561?v=3","gravatar_id":"","url":"https://api.github.com/users/cao","html_url":"https://github.com/cao","followers_url":"https://api.github.com/users/cao/followers","following_url":"https://api.github.com/users/cao/following{/other_user}","gists_url":"https://api.github.com/users/cao/gists{/gist_id}","starred_url":"https://api.github.com/users/cao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cao/subscriptions","organizations_url":"https://api.github.com/users/cao/orgs","repos_url":"https://api.github.com/users/cao/repos","events_url":"https://api.github.com/users/cao/events{/privacy}","received_events_url":"https://api.github.com/users/cao/received_events","type":"User","site_admin":false},"created_at":"2015-12-18T05:53:02Z","updated_at":"2015-12-18T05:53:02Z","body":"Chiming in: [angr-z3](https://github.com/angr/angr-z3) has the necessary changes to properly install Z3 on OSX for Python 2.7.11 and Python 3.5.1. It is also pip-installable on Linux. Some Windows support is there already and it should work out of the box, however it is untested (I also do not have a Windows box to test).\r\n\r\nOne of the core reasons why I prefer that a Python package installs its own library: I can take a virtualenv, freeze it, and install it on a different machine and I *know* that it works. This is a common task and makes reproducibility trivial. However, using system-wide Z3 forces me to make sure that the Z3 Python API I'm installing actually can use the library that I have installed system-wide and that there is no feature that I am calling from Python code that the (older) system-wide library does not support (in fact, Ubuntu and Debian both only provide 4.4.0, which contains a \"multitude of bugs\"). In addition, I now have to install system-wide packages on top of the Python ones, or I have manually check the library version and install it into the virtualenv. The former is something that -as a normal user- I might not be allowed to do. The latter is ugly and cumbersome. Hence, I strongly advocate that the Python API installs its own version of the library (which would only be used in Python virtualenv).\r\n\r\nOverall, personally, I would go with option 3 as it the intended and practically only supported way and because it has a majority of benefits over the other \"hacky\" solutions that we are discussing (see zardus' and asmeurer's (sdist setup.py in root) arguments).\r\n\r\nOut of curiosity, without wanting to step on any toes: Is the plan to support almost all package managers for all languages that have an API or just the main one? What other (main) package managers require files in the root directory? How many files would end up in the root directory at most? Is this maybe less of a problem than we think it is? What would prevent it from being moved in sub-directory at a later point (if the root really becomes clobbered or when better support for this is available in pip), but so that it is easily pip-installable now? Assuming that installs on Windows work, wouldn't this solve the entire issue?"}}