diff options
author | Oleg Pudeyev <oleg@bsdpower.com> | 2014-01-20 05:11:35 -0500 |
---|---|---|
committer | Oleg Pudeyev <oleg@bsdpower.com> | 2014-01-20 05:11:43 -0500 |
commit | a67707a9ca3019e46d8e61ff9fc32b57f88f66e2 (patch) | |
tree | 5e04075e25c3693807a3e2f26e5aad01a4f963e7 | |
parent | f40cc9ad8c656bb12c5f368c6bfb8c289f907dc6 (diff) | |
download | pycurl-a67707a9ca3019e46d8e61ff9fc32b57f88f66e2.tar.gz |
Consolidate installation instructions in install.rst
-rw-r--r-- | INSTALL.rst | 33 | ||||
-rw-r--r-- | README.rst | 58 |
2 files changed, 20 insertions, 71 deletions
diff --git a/INSTALL.rst b/INSTALL.rst index 7600f0a..f96fa55 100644 --- a/INSTALL.rst +++ b/INSTALL.rst @@ -32,6 +32,23 @@ LD_LIBRARY_PATH environment variable accordingly. This normally applies only if there is more than one version of libcurl installed, e.g. one in /usr/lib and one in /usr/local/lib. +PycURL requires that the SSL library that it is built against is the same +one libcurl, and therefore PycURL, uses at runtime. PycURL's ``setup.py`` +uses ``curl-config`` to attempt to figure out which SSL library libcurl +was compiled against, however this does not always work. If PycURL is unable +to determine the SSL library in use it will print a warning similar to +the following:: + + src/pycurl.c:137:4: warning: #warning "libcurl was compiled with SSL support, but configure could not determine which " "library was used; thus no SSL crypto locking callbacks will be set, which may " "cause random crashes on SSL requests" [-Wcpp] + +It will then fail at runtime as follows:: + + ImportError: pycurl: libcurl link-time ssl backend (openssl) is different from compile-time ssl backend (none/other) + +To fix this, you need to tell ``setup.py`` what SSL backend is used:: + + python setup.py --with-[ssl|gnutls|nss] install + easy_install / pip ------------------ @@ -48,23 +65,11 @@ environment variable:: easy_install pycurl The same applies to the SSL backend, if you need to specify it (see the SSL -section below):: +note above):: - export PYCURL_SSL_LIBRARY=openssl + export PYCURL_SSL_LIBRARY=[openssl|gnutls|nss] easy_install pycurl - -SSL ---- - -PycURL has locks around crypto functions. In order to compile correct locking -code, it has to know which SSL library is going to be used by libcurl at -runtime. setup.py will attempt to automatically detect the SSL library that -libcurl uses, but this does not always work. In the cases when setup.py cannot -figure out the SSL library, it must be provided via --with-ssl/--with-gnutls/ ---with-nss arguments, just like libcurl's configure script uses, or via -PYCURL_SSL_LIBRARY=openssl|gnutls|nss environment variable. - Please note the difference in spelling that concerns OpenSSL: the command-line argument is --with-ssl, to match libcurl, but the environment variable value is "openssl". @@ -46,63 +46,7 @@ Requirements Installation ------------ -You can install the most recent PycURL version using `easy_install`_:: - - easy_install pycurl - -or `pip`_:: - - pip install pycurl - -Installing from source is performed via ``setup.py``:: - - python setup.py install - -You will need libcurl headers and libraries installed to install PycURL -from source. PycURL uses ``curl-config`` to determine correct flags/libraries -to use during compilation; you can override the location of ``curl-config`` -if it is not in PATH or you want to use a custom libcurl installation:: - - python setup.py --curl-config=/path/to/curl-config install - -Sometimes it is more convenient to use an environment variable, if -you are not directly invoking ``setup.py``:: - - PYCURL_CURL_CONFIG=/path/to/curl-config python setup.py install - -``curl-config`` is expected to support the following options: - -- ``--version`` -- ``--cflags`` -- ``--libs`` -- ``--static-libs`` (if ``--libs`` does not work) - -PycURL requires that the SSL library that it is built against is the same -one libcurl, and therefore PycURL, uses at runtime. PycURL's ``setup.py`` -uses ``curl-config`` to attempt to figure out which SSL library libcurl -was compiled against, however this does not always work. If PycURL is unable -to determine the SSL library in use it will print a warning similar to -the following:: - - src/pycurl.c:137:4: warning: #warning "libcurl was compiled with SSL support, but configure could not determine which " "library was used; thus no SSL crypto locking callbacks will be set, which may " "cause random crashes on SSL requests" [-Wcpp] - -It will then fail at runtime as follows:: - - ImportError: pycurl: libcurl link-time ssl backend (openssl) is different from compile-time ssl backend (none/other) - -To fix this, you need to tell ``setup.py`` what SSL backend is used:: - - python setup.py --with-[ssl|gnutls|nss] install - -Or use an environment variable:: - - PYCURL_SSL_LIBRARY=openssl|gnutls|nss python setup.py install - -Note the difference between ``--with-ssl`` (for compatibility with libcurl) and -``PYCURL_SSL_LIBRARY=openssl``. - -.. _easy_install: http://peak.telecommunity.com/DevCenter/EasyInstall -.. _pip: http://pypi.python.org/pypi/pip +Please see README.rst for installation instructions. Support ------- |