{"action":"created","issue":{"url":"https://api.github.com/repos/esheldon/esutil/issues/18","repository_url":"https://api.github.com/repos/esheldon/esutil","labels_url":"https://api.github.com/repos/esheldon/esutil/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/esheldon/esutil/issues/18/comments","events_url":"https://api.github.com/repos/esheldon/esutil/issues/18/events","html_url":"https://github.com/esheldon/esutil/issues/18","id":176112693,"number":18,"title":"esutil assumes that on Darwin Python was built with both `i386` and `x86_64`","user":{"login":"wmwv","id":3201257,"avatar_url":"https://avatars.githubusercontent.com/u/3201257?v=3","gravatar_id":"","url":"https://api.github.com/users/wmwv","html_url":"https://github.com/wmwv","followers_url":"https://api.github.com/users/wmwv/followers","following_url":"https://api.github.com/users/wmwv/following{/other_user}","gists_url":"https://api.github.com/users/wmwv/gists{/gist_id}","starred_url":"https://api.github.com/users/wmwv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wmwv/subscriptions","organizations_url":"https://api.github.com/users/wmwv/orgs","repos_url":"https://api.github.com/users/wmwv/repos","events_url":"https://api.github.com/users/wmwv/events{/privacy}","received_events_url":"https://api.github.com/users/wmwv/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2016-09-09T21:13:47Z","updated_at":"2016-09-10T00:44:44Z","closed_at":null,"body":"`esutil` assumes that on Darwin (Mac OS X) Python was built with both `i386` and `x86_64` but this isn't necessarily true.  \r\n\r\nThe `setup.py` file has the following\r\n```\r\nif platform.system()=='Darwin':\r\n    extra_compile_args=['-arch','i386','-arch','x86_64']\r\n    extra_link_args=['-arch','i386','-arch','x86_64']\r\nelse:\r\n    extra_compile_args=[]\r\n    extra_link_args=[]\r\n```\r\n\r\nBut, e.g., on my system, Python was only installed with x86_64 libraries."},"comment":{"url":"https://api.github.com/repos/esheldon/esutil/issues/comments/246075970","html_url":"https://github.com/esheldon/esutil/issues/18#issuecomment-246075970","issue_url":"https://api.github.com/repos/esheldon/esutil/issues/18","id":246075970,"user":{"login":"timj","id":60622,"avatar_url":"https://avatars.githubusercontent.com/u/60622?v=3","gravatar_id":"","url":"https://api.github.com/users/timj","html_url":"https://github.com/timj","followers_url":"https://api.github.com/users/timj/followers","following_url":"https://api.github.com/users/timj/following{/other_user}","gists_url":"https://api.github.com/users/timj/gists{/gist_id}","starred_url":"https://api.github.com/users/timj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/timj/subscriptions","organizations_url":"https://api.github.com/users/timj/orgs","repos_url":"https://api.github.com/users/timj/repos","events_url":"https://api.github.com/users/timj/events{/privacy}","received_events_url":"https://api.github.com/users/timj/received_events","type":"User","site_admin":false},"created_at":"2016-09-10T00:44:43Z","updated_at":"2016-09-10T00:44:43Z","body":"@wmwv does something like this work for you:\r\n```python\r\n#!/usr/bin/env python\r\n\r\nimport distutils.sysconfig\r\n\r\ncflags = distutils.sysconfig.get_config_var(\"PY_CFLAGS\")\r\n\r\narchitectures = (\"x86_64\", \"i386\")\r\nextra_compile_args = []\r\nfor arch in architectures:\r\n    if \"arch {}\".format(arch) in cflags:\r\n        extra_compile_args.extend([\"-arch\", arch])\r\n\r\nextra_link_args = extra_compile_args\r\nprint(\"Args: {}\".format(extra_compile_args))\r\n```\r\n(obviously that's a standalone version). For me it just selects `x86_64` architecture on my Anaconda python and on my system python (made by apple) it includes both architectures. On my homebrew python it includes nothing because homebrew did not specify an architecture at all."}}
{"actor":{"display_login":"timj"}}