From 24a72962eb21fb4c59d63b7cadea7f67effe10a8 Mon Sep 17 00:00:00 2001 From: Daniele Varrazzo Date: Wed, 30 Jun 2021 17:04:19 +0100 Subject: [PATCH] Cleanup of metadata and readme presented on PyPI --- README.rst | 21 +++++++++++++++------ psycopg/README.rst | 12 ++++-------- psycopg/setup.cfg | 10 +++++++++- psycopg_c/README-binary.rst | 18 ++++++++++++++++++ psycopg_c/README.rst | 32 +++----------------------------- psycopg_c/setup.cfg | 10 +++++++++- tools/build/copy_to_binary.py | 1 + 7 files changed, 59 insertions(+), 45 deletions(-) create mode 100644 psycopg_c/README-binary.rst diff --git a/README.rst b/README.rst index 94e9ca618..25bfff861 100644 --- a/README.rst +++ b/README.rst @@ -1,5 +1,5 @@ Psycopg 3 -- PostgreSQL database adapter for Python -================================================== +=================================================== Psycopg 3 is a modern implementation of a PostgreSQL adapter for Python. @@ -7,9 +7,8 @@ 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 @@ -17,15 +16,25 @@ project`__:: .. __: 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 ------- @@ -48,7 +57,7 @@ different requirements: 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 diff --git a/psycopg/README.rst b/psycopg/README.rst index 7b4429536..448643bd3 100644 --- a/psycopg/README.rst +++ b/psycopg/README.rst @@ -1,17 +1,13 @@ 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 diff --git a/psycopg/setup.cfg b/psycopg/setup.cfg index af58def2e..a7c02892b 100644 --- a/psycopg/setup.cfg +++ b/psycopg/setup.cfg @@ -13,9 +13,17 @@ project_urls = 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 diff --git a/psycopg_c/README-binary.rst b/psycopg_c/README-binary.rst new file mode 100644 index 000000000..213cb6f58 --- /dev/null +++ b/psycopg_c/README-binary.rst @@ -0,0 +1,18 @@ +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 diff --git a/psycopg_c/README.rst b/psycopg_c/README.rst index 374559547..52ea8805d 100644 --- a/psycopg_c/README.rst +++ b/psycopg_c/README.rst @@ -7,37 +7,11 @@ You shouldn't install this package directly: use instead :: 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 diff --git a/psycopg_c/setup.cfg b/psycopg_c/setup.cfg index b7e638534..4e66ecdcb 100644 --- a/psycopg_c/setup.cfg +++ b/psycopg_c/setup.cfg @@ -14,9 +14,17 @@ project_urls = # 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 diff --git a/tools/build/copy_to_binary.py b/tools/build/copy_to_binary.py index ae8422d86..7cab25cb8 100755 --- a/tools/build/copy_to_binary.py +++ b/tools/build/copy_to_binary.py @@ -27,6 +27,7 @@ def sed_i(pattern: str, repl: str, filename: Union[str, Path]) -> None: 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" -- 2.47.3