Psycopg 3 -- PostgreSQL database adapter for Python
-==================================================
+===================================================
Psycopg 3 is a modern implementation of a PostgreSQL adapter for Python.
Installation
------------
-The library is still in a development stage and is not available on PyPI in
-the form of packages yet. You can install it directly `from the GitHub
-project`__::
+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
.. __: https://github.com/psycopg/psycopg
+or the last packages `released on TestPyPI`__ using::
+
+ pip install -i https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ psycopg
+
+.. __: https://test.pypi.org/project/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-get install libpq5
+ sudo apt install libpq5
Please check your system's documentation for information about installing the
``libpq`` on your platform.
+For further information about installation please check `the documentation`__.
+
+.. __: https://www.psycopg.org/psycopg3/docs/basic/install.html
+
Hacking
-------
C/Cython. In order to build it you will need a few development tools: please
look at `Local installation`__ in the docs for the details.
- .. __: https://www.psycopg.org/psycopg/docs/install.html#local-installation
+ .. __: https://www.psycopg.org/psycopg3/docs/basic/install.html#local-installation
You can create a local virtualenv and install there the packages `in
development mode`__, together with their development and testing
Psycopg 3: PostgreSQL database adapter for Python
=================================================
-This distribution contains the pure Python package ``psycopg``.
-
-Installation::
-
- pip install psycopg
+Psycopg 3 is a modern implementation of a PostgreSQL adapter for Python.
-Even if the package is pure Python, the PostgreSQL client library libpq must
-be available in the system.
+This distribution contains the pure Python package ``psycopg``.
-Please read `the project readme`__ for more details.
+Please check out `the project readme`__ for more details.
.. __: https://github.com/psycopg/psycopg#readme
+
Copyright (C) 2020-2021 The Psycopg Team
Download = https://pypi.org/project/psycopg/
classifiers =
+ Development Status :: 3 - Alpha
Intended Audience :: Developers
- Programming Language :: Python :: 3
License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
+ Operating System :: MacOS :: MacOS X
+ Operating System :: Microsoft :: Windows
+ Operating System :: POSIX
+ Programming Language :: Python :: 3
+ Programming Language :: Python :: 3.6
+ Programming Language :: Python :: 3.7
+ Programming Language :: Python :: 3.8
+ Programming Language :: Python :: 3.9
Topic :: Database
Topic :: Database :: Front-Ends
Topic :: Software Development
--- /dev/null
+Psycopg 3: PostgreSQL database adapter for Python - binary package
+==================================================================
+
+This distribution contains the precompiled optimization package
+``psycopg_binary``.
+
+You shouldn't install this package directly: use instead ::
+
+ pip install psycopg[binary]
+
+Please read `the project readme`__ and `the installation documentation`__ for
+more details.
+
+.. __: https://github.com/psycopg/psycopg#readme
+.. __: https://www.psycopg.org/psycopg3/docs/basic/install.html
+
+
+Copyright (C) 2020-2021 The Psycopg Team
pip install psycopg[c]
-Installing this distribution requires the ``libpq-dev`` package and other
-packages normally used to build Python C extensions. If you cannot meet these
-dependencies, don't worry: you don't need the package: please install the
-``psycopg`` package only.
-
-Please read `the project readme`__ for more details.
+Please read `the project readme`__ and `the installation documentation`__ for
+more details.
.. __: https://github.com/psycopg/psycopg#readme
-
-
-Requirements
-------------
-
-On Linux, in order to install this package you will need:
-
-- a C compiler,
-- the libpq development packages (packages libpq-dev or postgresql-devel,
- according to your distribution)
-- the `pg_config` binary in your PATH
-
-If you don't have these prerequisites please don't try to install this
-package: please install the `binary version`_.
-
-
-Binary version
---------------
-
-This library is available pre-compiled and bundled with all the required
-client library as ``psycopg_binary``. In order to use it please install::
-
- pip install psycopg[binary]
+.. __: https://www.psycopg.org/psycopg3/docs/basic/install.html
Copyright (C) 2020-2021 The Psycopg Team
# TODO: classifiers
classifiers =
+ Development Status :: 3 - Alpha
Intended Audience :: Developers
- Programming Language :: Python :: 3
License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)
+ Operating System :: MacOS :: MacOS X
+ Operating System :: Microsoft :: Windows
+ Operating System :: POSIX
+ Programming Language :: Python :: 3
+ Programming Language :: Python :: 3.6
+ Programming Language :: Python :: 3.7
+ Programming Language :: Python :: 3.8
+ Programming Language :: Python :: 3.9
Topic :: Database
Topic :: Database :: Front-Ends
Topic :: Software Development
shutil.copytree(pdir / "psycopg_c", target)
shutil.move(str(target / "psycopg_c"), str(target / "psycopg_binary"))
+shutil.move(str(target / "README-binary.rst"), str(target / "README.rst"))
sed_i("psycopg-c", "psycopg-binary", target / "setup.cfg")
sed_i(
r"__impl__\s*=.*", '__impl__ = "binary"', target / "psycopg_binary/pq.pyx"