installing.rst 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  1. .. % $Id: installing.rst,v 1.15 2011/07/24 19:00:53 stroeder Exp $
  2. ***********************
  3. Building and installing
  4. ***********************
  5. python-ldap is built and installed using the Python DistUtils installed
  6. along with your Python installation:
  7. ::
  8. python setup.py build
  9. python setup.py install
  10. If you have more than one Python interpreter installed locally you should
  11. use the same one you plan to use python-ldap with.
  12. See further instructions for using DistUtils here: http://docs.python.org/install/index.html
  13. Prerequisites
  14. =============
  15. The following software packages are required to be installed
  16. on the local system when building python-ldap:
  17. - Python version 2.3 or later including its development files: http://www.python.org/
  18. - OpenLDAP client libs version 2.4.11 or later: http://www.openldap.org/
  19. It is not possible and not supported to build with prior versions.
  20. - OpenSSL (optional): http://www.openssl.org/
  21. - cyrus-sasl (optional): http://www.cyrussasl.org
  22. - Kerberos libs, MIT or heimdal (optional)
  23. Furthermore some sub-modules of :py:mod:`ldap.controls` and :py:mod:`ldap.extop`
  24. require :py:mod:`pyasn1` and :py:mod:`pyasn1_modules` to be installed.
  25. http://pyasn1.sf.net
  26. setup.cfg
  27. =========
  28. The file setup.cfg allows to set some build and installation
  29. parameters for reflecting the local installation of required
  30. software packages. Only section [_ldap] is described here.
  31. More information about other sections can be found in the
  32. documentation of Python's DistUtils.
  33. .. data:: library_dirs
  34. Specifies in which directories to search for required libraries.
  35. .. data:: include_dirs
  36. Specifies in which directories to search for include files of required libraries.
  37. .. data:: libs
  38. A space-separated list of library names to link to (see :ref:`libs-used-label`).
  39. .. data:: extra_compile_args
  40. Compiler options.
  41. .. data:: extra_objects
  42. .. _libs-used-label:
  43. Libs used
  44. ---------
  45. .. data:: ldap
  46. .. data:: ldap_r
  47. The LDAP protocol library of OpenLDAP. ldap_r is the reentrant version
  48. and should be preferred.
  49. .. data:: lber
  50. The BER encoder/decoder library of OpenLDAP.
  51. .. data:: sasl2
  52. The Cyrus-SASL library if needed and present during build
  53. .. data:: ssl
  54. The SSL/TLS library of OpenSSL if needed and present during build
  55. .. data:: crypto
  56. The basic cryptographic library of OpenSSL if needed and present during build
  57. Example
  58. =============
  59. The following example is for a full-featured build (including SSL and SASL support)
  60. of python-ldap with OpenLDAP installed in a different prefix directory
  61. (here /opt/openldap-2.3) and SASL header files found in /usr/include/sasl.
  62. Debugging symbols are preserved with compile option -g.
  63. ::
  64. [_ldap]
  65. library_dirs = /opt/openldap-2.3/lib
  66. include_dirs = /opt/openldap-2.3/include /usr/include/sasl
  67. extra_compile_args = -g
  68. extra_objects =
  69. libs = ldap_r lber sasl2 ssl crypto