From 5f4cc86deb9361308ca6735cf13f0c9b2cad90b3 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Mon, 11 Dec 2017 13:29:19 +0100 Subject: [PATCH] Provide build deps for Alpine and CentOS Provide build deps for Alpine and CentOS Also updates build deps for Fedora and Debian, and format the shell commands nicely. See: https://github.com/pyldap/pyldap/issues/91#issuecomment-350098897 https://github.com/python-ldap/python-ldap/pull/113 Some changes by Petr Viktorin Signed-off-by: Christian Heimes --- Doc/installing.rst | 38 ++++++++++++++++++++++++++++---------- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/Doc/installing.rst b/Doc/installing.rst index a5e0892..01d39c7 100644 --- a/Doc/installing.rst +++ b/Doc/installing.rst @@ -1,3 +1,5 @@ +.. highlight:: console + .. _installing: Installing python-ldap @@ -18,7 +20,7 @@ The preferred point for downloading the “official” source distribution is the `PyPI repository`_ which supports installing via `pip`_. For example:: - python -m pip install python-ldap + $ python -m pip install python-ldap .. _PyPI repository: https://pypi.python.org/pypi/python-ldap/ .. _pip: https://pip.pypa.io/en/stable/ @@ -83,8 +85,8 @@ Mac OS X You can install directly with pip:: - xcode-select --install - pip install python-ldap \ + $ xcode-select --install + $ pip install python-ldap \ --global-option=build_ext \ --global-option="-I$(xcrun --show-sdk-path)/usr/include/sasl" @@ -98,8 +100,8 @@ Installing from Source python-ldap is built and installed using the Python setuptools. From a source repository:: - python -m pip install setuptools - python setup.py install + $ python -m pip install setuptools + $ python setup.py install If you have more than one Python interpreter installed locally, you should use the same one you plan to use python-ldap with. @@ -132,22 +134,38 @@ on the local system when building python-ldap: .. _Cyrus SASL: https://www.cyrusimap.org/sasl/ +Alpine +------ + +Packages for building:: + + # apk add build-base openldap-dev python2-dev python3-dev + +CentOS +------ + +Packages for building:: + + # yum groupinstall "Development tools" + # yum install openldap-devel python-devel + Debian ------ Packages for building and testing:: - apt-get install build-essential python3-dev python2.7-dev libldap2-dev \ - libsasl2-dev slapd ldap-utils python-tox valgrind - + # apt-get install build-essential python3-dev python2.7-dev \ + libldap2-dev libsasl2-dev slapd ldap-utils python-tox \ + lcov valgrind Fedora ------ Packages for building and testing:: - dnf install "@C Development Tools and Libraries" openldap-devel \ - python2-devel python3-devel python3-tox valgrind clang-analyzer + # dnf install "@C Development Tools and Libraries" openldap-devel \ + python2-devel python3-devel python3-tox \ + lcov clang-analyzer valgrind .. note::