From: Máté Gyöngyösi Date: Fri, 15 Nov 2024 13:58:02 +0000 (+0100) Subject: docs: extend `libpq` install instructions for cross-platform use X-Git-Tag: 3.2.4~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b7145169cafadc4603a4e248aaee4e1b12d94d4c;p=thirdparty%2Fpsycopg.git docs: extend `libpq` install instructions for cross-platform use See #950. --- diff --git a/README.rst b/README.rst index 004f0d039..68b445859 100644 --- a/README.rst +++ b/README.rst @@ -17,16 +17,27 @@ For further information about installation please check `the documentation`__. .. __: https://www.psycopg.org/psycopg3/docs/basic/install.html +.. _Hacking: + Hacking ------- -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:: +In order to work on the Psycopg source code, you must have the +``libpq`` PostgreSQL client library installed on the system. For instance, on +Debian systems, you can obtain it by running:: sudo apt install libpq5 -After which you can clone this repository:: +On macOS, run:: + + brew install libpq + +On Windows you can use EnterpriseDB's `installers`__ to obtain ``libpq`` +which is included in the Command Line Tools. + +.. __: https://www.enterprisedb.com/downloads/postgres-postgresql-downloads + +You can then clone this repository to develop Psycopg:: git clone https://github.com/psycopg/psycopg.git cd psycopg @@ -72,3 +83,13 @@ Now hack away! You can run the tests using:: psql -c 'create database psycopg_test' export PSYCOPG_TEST_DSN="dbname=psycopg_test" pytest + + +Cross-compiling +--------------- + +To use cross-platform zipapps created with `shiv`__ that include Psycopg +as a dependency you must also have ``libpq`` installed. See +`the section above `_ for install instructions. + +.. __: https://github.com/linkedin/shiv