{"action":"created","issue":{"url":"https://api.github.com/repos/jameskermode/f90wrap/issues/34","labels_url":"https://api.github.com/repos/jameskermode/f90wrap/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/jameskermode/f90wrap/issues/34/comments","events_url":"https://api.github.com/repos/jameskermode/f90wrap/issues/34/events","html_url":"https://github.com/jameskermode/f90wrap/issues/34","id":119234761,"number":34,"title":"import setuptools to create package that plays nice with pip","user":{"login":"davidovitch","id":2007257,"avatar_url":"https://avatars.githubusercontent.com/u/2007257?v=3","gravatar_id":"","url":"https://api.github.com/users/davidovitch","html_url":"https://github.com/davidovitch","followers_url":"https://api.github.com/users/davidovitch/followers","following_url":"https://api.github.com/users/davidovitch/following{/other_user}","gists_url":"https://api.github.com/users/davidovitch/gists{/gist_id}","starred_url":"https://api.github.com/users/davidovitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidovitch/subscriptions","organizations_url":"https://api.github.com/users/davidovitch/orgs","repos_url":"https://api.github.com/users/davidovitch/repos","events_url":"https://api.github.com/users/davidovitch/events{/privacy}","received_events_url":"https://api.github.com/users/davidovitch/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-27T18:42:22Z","updated_at":"2015-12-02T12:53:14Z","closed_at":"2015-12-02T12:53:14Z","body":"Currently, ```setup.py``` uses ```setup``` from ```numpy.distutils```:\r\n```python\r\nfrom numpy.distutils.core import setup, Extension\r\nfrom numpy.distutils.system_info import get_info\r\n```\r\nHowever, you can still rely on ```setuptools``` in combination with ```numpy.distutils``` (which is required for the compiled extensions). This happens when ```setuptools``` is imported before ```numpy.distutils```:\r\n```python\r\nimport setuptools\r\nfrom numpy.distutils.core import setup, Extension\r\nfrom numpy.distutils.system_info import get_info\r\n```\r\n\r\nI am not aware of the details, but I found in an old mailing list entry [1] that ```numpy.distutils``` figures out ```import setuptools``` happened before its own import and therefore magic happens... The result is still the same, but now the packaging is just slightly cleaner and you can actually properly uninstall f90wrap with pip from a virtual environment. I think the latter is real bonus.\r\n\r\n[1] http://comments.gmane.org/gmane.comp.python.f2py.user/707 "},"comment":{"url":"https://api.github.com/repos/jameskermode/f90wrap/issues/comments/161283098","html_url":"https://github.com/jameskermode/f90wrap/issues/34#issuecomment-161283098","issue_url":"https://api.github.com/repos/jameskermode/f90wrap/issues/34","id":161283098,"user":{"login":"jameskermode","id":1049932,"avatar_url":"https://avatars.githubusercontent.com/u/1049932?v=3","gravatar_id":"","url":"https://api.github.com/users/jameskermode","html_url":"https://github.com/jameskermode","followers_url":"https://api.github.com/users/jameskermode/followers","following_url":"https://api.github.com/users/jameskermode/following{/other_user}","gists_url":"https://api.github.com/users/jameskermode/gists{/gist_id}","starred_url":"https://api.github.com/users/jameskermode/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jameskermode/subscriptions","organizations_url":"https://api.github.com/users/jameskermode/orgs","repos_url":"https://api.github.com/users/jameskermode/repos","events_url":"https://api.github.com/users/jameskermode/events{/privacy}","received_events_url":"https://api.github.com/users/jameskermode/received_events","type":"User","site_admin":false},"created_at":"2015-12-02T12:53:14Z","updated_at":"2015-12-02T12:53:14Z","body":"Done, let me know of any problems!"}}