Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Check for OpenSSL.crypto when detecting OpenSSL. #191

Merged
merged 1 commit into from
May 26, 2015

Conversation

craigcitro
Copy link
Contributor

Previously, we assumed that anyone using OpenSSL would have installed it via
a mechanism like pip; this has come back to bite us.

We modify our code to look for OpenSSL.crypto, not just OpenSSL, and add
another (unpleasant) test.

Fixes #190.

PTAL @dhermes

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 65.34% when pulling 50ad080 on craigcitro:openssl_detection into c61bdf4 on google:master.

_, _package_dir, _ = imp.find_module('OpenSSL')
if not (os.path.isfile(os.path.join(_package_dir, 'crypto.py')) or
os.path.isfile(os.path.join(_package_dir, 'crypto.so'))):
raise ImportError('No module named OpenSSL.crypto')

This comment was marked as spam.

This comment was marked as spam.

Previously, we assumed that anyone using `OpenSSL` would have installed it via
a mechanism like `pip`; this has come back to bite us.

We modify our code to look for `OpenSSL.crypto`, not just `OpenSSL`, and add
another (unpleasant) test.

Fixes googleapis#190.
@craigcitro craigcitro force-pushed the openssl_detection branch from 50ad080 to df8f98e Compare May 26, 2015 18:49
@craigcitro
Copy link
Contributor Author

PTAL

@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 65.34% when pulling df8f98e on craigcitro:openssl_detection into c61bdf4 on google:master.

@dhermes
Copy link
Contributor

dhermes commented May 26, 2015

LGTM.

craigcitro added a commit that referenced this pull request May 26, 2015
Check for OpenSSL.crypto when detecting OpenSSL.
@craigcitro craigcitro merged commit d1af8f3 into googleapis:master May 26, 2015
@craigcitro craigcitro deleted the openssl_detection branch May 26, 2015 19:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OpenSSL detection fails if OpenSSL is available, but OpenSSL.crypto is missing.
4 participants