From: Daniele Varrazzo Date: Sun, 26 Sep 2021 21:08:11 +0000 (+0200) Subject: Drop "installing from source" from readme and install docs cleanup X-Git-Tag: 3.0~56 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a0c66ee0bbe21112dad2f442e023fce517e23b8d;p=thirdparty%2Fpsycopg.git Drop "installing from source" from readme and install docs cleanup --- diff --git a/README.rst b/README.rst index c0101bc83..f12f6a9ac 100644 --- a/README.rst +++ b/README.rst @@ -9,30 +9,8 @@ Installation Quick version:: - pip install -U pip # upgrade pip to at least 20.3 - pip install --pre psycopg[binary,pool] # install binary files - - -Install from source -------------------- - -The library is still in a development stage: you can obtain the most -up-to-date code `from the GitHub project`__:: - - $ pip install git+https://github.com/psycopg/psycopg.git#subdirectory=psycopg - $ python3 - >>> import psycopg - -.. __: https://github.com/psycopg/psycopg - -You are required to have the ``libpq``, the PostgreSQL client library, already -installed in the system before using ``psycopg``. On Debian system you can -obtain it by running:: - - sudo apt install libpq5 - -Please check your system's documentation for information about installing the -``libpq`` on your platform. + pip install --upgrade pip # upgrade pip to at least 20.3 + pip install --pre psycopg[binary,pool] # install binary dependencies For further information about installation please check `the documentation`__. @@ -42,7 +20,13 @@ For further information about installation please check `the documentation`__. Hacking ------- -In order to work on the Psycopg source code you should clone this repository:: +In order to work on the Psycopg source code you need to have the ``libpq`` +PostgreSQL client library installed in the system. For instance, on Debian +systems, you can obtain it by running:: + + sudo apt install libpq5 + +After which you can clone this repository:: git clone https://github.com/psycopg/psycopg.git cd psycopg @@ -52,9 +36,8 @@ packages: that's why you don't see a ``setup.py`` here. The packages may have different requirements: - The ``psycopg`` directory contains the pure python implementation of - ``psycopg``. The package has only a runtime dependency on the ``libpq``, - the PostgreSQL client library, which should have been already installed in - your system. + ``psycopg``. The package has only a runtime dependency on the ``libpq``, the + PostgreSQL client library, which should be installed in your system. - The ``psycopg_c`` directory contains an optimization module written in C/Cython. In order to build it you will need a few development tools: please diff --git a/docs/basic/install.rst b/docs/basic/install.rst index 2f2038d2d..b8f2f7e97 100644 --- a/docs/basic/install.rst +++ b/docs/basic/install.rst @@ -5,7 +5,7 @@ Installation In short:: - pip install -U pip # upgrade pip to at least 20.3 + pip install --upgrade pip # upgrade pip to at least 20.3 pip install --pre psycopg[binary] and you should be :ref:`ready to start `. @@ -21,9 +21,9 @@ packages by running:: pip install --pre psycopg[binary] -This will install a self-contained package with all the libraries needed. -You will need pip >= 20.3 at least: please run ``pip install -U pip`` to update -it beforehand. +This will install a self-contained package with all the libraries needed. You +will need pip >= 20.3 at least: please run ``pip install --upgrade pip`` to +update it beforehand. The above package should work in most situations. It **will not work** in some cases though: @@ -54,8 +54,8 @@ In these case you should proceed to a :ref:`local installation Local installation ------------------ -A "Local installation" means obtaining a performing and maintainable library. -The library will include a performing C module and will be bound to the system +A "Local installation" results in a performing and maintainable library. The +library will include a the speed-up C module and will be linked to the system libraries (``libpq``, ``libssl``...) so that system upgrade of libraries will upgrade the libraries used by Psycopg 3 too. This is the preferred way to install Psycopg for a production site. @@ -63,8 +63,8 @@ install Psycopg for a production site. In order to perform a local installation you need some prerequisites: - a C compiler, -- Python development headers (e.g. the python3-dev package). -- PostgreSQL client development headers (e.g. the libpq-dev package). +- Python development headers (e.g. the ``python3-dev`` package). +- PostgreSQL client development headers (e.g. the ``libpq-dev`` package). - The :program:`pg_config` program available in the :envvar:`PATH`. You **must be able** to troubleshoot an extension build, for instance you must diff --git a/psycopg/README.rst b/psycopg/README.rst index 07d3e741a..d1e30bfe5 100644 --- a/psycopg/README.rst +++ b/psycopg/README.rst @@ -11,7 +11,7 @@ Installation In short, run the following:: - pip install -U pip # to upgrade pip + pip install --upgrade pip # to upgrade pip pip install psycopg[binary,pool] # to install package and dependencies If something goes wrong, and for more information about installation, please