{"action":"created","issue":{"url":"https://api.github.com/repos/pyca/cryptography/issues/2283","labels_url":"https://api.github.com/repos/pyca/cryptography/issues/2283/labels{/name}","comments_url":"https://api.github.com/repos/pyca/cryptography/issues/2283/comments","events_url":"https://api.github.com/repos/pyca/cryptography/issues/2283/events","html_url":"https://github.com/pyca/cryptography/issues/2283","id":101919814,"number":2283,"title":"Installing cryptography with old pypy builds (and caches) bad wheels","user":{"login":"jerith","id":43731,"avatar_url":"https://avatars.githubusercontent.com/u/43731?v=3","gravatar_id":"","url":"https://api.github.com/users/jerith","html_url":"https://github.com/jerith","followers_url":"https://api.github.com/users/jerith/followers","following_url":"https://api.github.com/users/jerith/following{/other_user}","gists_url":"https://api.github.com/users/jerith/gists{/gist_id}","starred_url":"https://api.github.com/users/jerith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jerith/subscriptions","organizations_url":"https://api.github.com/users/jerith/orgs","repos_url":"https://api.github.com/users/jerith/repos","events_url":"https://api.github.com/users/jerith/events{/privacy}","received_events_url":"https://api.github.com/users/jerith/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-19T15:27:36Z","updated_at":"2015-08-21T12:49:44Z","closed_at":"2015-08-20T19:14:50Z","body":"If I install cryptography with pypy 2.5.1, the new cffi build mechanism isn't invoked and I get an installed package without any of the compiled modules. However, pip builds and caches `cryptography-1.0-py2-none-any.whl` which is platform-independent (because it has no compiled modules). This bad wheel then gets used for any further installs with any Python 2 interpreter, and happily installs a cryptography without any of the interesting bits.\r\n\r\nTo illustrate with an example:\r\n```console\r\nroot@e1ffcbbe8f9d:/foo$ # Before cryptograpy is installed:\r\nroot@e1ffcbbe8f9d:/foo$ find ~/.cache/pip/wheels -name 'cryptography*'\r\nroot@e1ffcbbe8f9d:/foo$ /env-pypy-2.6.0/bin/pypy -c 'import cryptography.hazmat.bindings._openssl' 2>&1 | grep ImportError\r\nImportError: No module named cryptography\r\n\r\nroot@e1ffcbbe8f9d:/foo$ # Install cryptography using old pypy:\r\nroot@e1ffcbbe8f9d:/foo$ /env-pypy-2.5.1/bin/pip install cryptography -q\r\nroot@e1ffcbbe8f9d:/foo$ find ~/.cache/pip/wheels -name 'cryptography*'\r\n/root/.cache/pip/wheels/6d/db/24/a5bbe660e3b632abb007ba6d8c91b5fa51a83bb53544c16709/cryptography-1.0-py2-none-any.whl\r\n\r\nroot@e1ffcbbe8f9d:/foo$ # After that, install cryptography using new pypy:\r\nroot@e1ffcbbe8f9d:/foo$ /env-pypy-2.6.0/bin/pip install cryptography -q\r\nroot@e1ffcbbe8f9d:/foo$ find ~/.cache/pip/wheels -name 'cryptography*'\r\n/root/.cache/pip/wheels/6d/db/24/a5bbe660e3b632abb007ba6d8c91b5fa51a83bb53544c16709/cryptography-1.0-py2-none-any.whl\r\n\r\nroot@e1ffcbbe8f9d:/foo$ # The installed cryptography is now broken:\r\nroot@e1ffcbbe8f9d:/foo$ /env-pypy-2.6.0/bin/pypy -c 'import cryptography.hazmat.bindings._openssl' 2>&1 | grep ImportError\r\nImportError: No module named cryptography.hazmat.bindings._openssl\r\n```\r\n\r\nI think a reasonable solution is to explicitly fail to build or install on older versions of pypy. This would prevent the broken wheel from being being built, and would also give a useful error at install time instead of silently installing a nonfunctional cryptography."},"comment":{"url":"https://api.github.com/repos/pyca/cryptography/issues/comments/133415938","html_url":"https://github.com/pyca/cryptography/issues/2283#issuecomment-133415938","issue_url":"https://api.github.com/repos/pyca/cryptography/issues/2283","id":133415938,"user":{"login":"jerith","id":43731,"avatar_url":"https://avatars.githubusercontent.com/u/43731?v=3","gravatar_id":"","url":"https://api.github.com/users/jerith","html_url":"https://github.com/jerith","followers_url":"https://api.github.com/users/jerith/followers","following_url":"https://api.github.com/users/jerith/following{/other_user}","gists_url":"https://api.github.com/users/jerith/gists{/gist_id}","starred_url":"https://api.github.com/users/jerith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jerith/subscriptions","organizations_url":"https://api.github.com/users/jerith/orgs","repos_url":"https://api.github.com/users/jerith/repos","events_url":"https://api.github.com/users/jerith/events{/privacy}","received_events_url":"https://api.github.com/users/jerith/received_events","type":"User","site_admin":false},"created_at":"2015-08-21T12:49:44Z","updated_at":"2015-08-21T12:49:44Z","body":"Thanks!"}}