Metadata-Version: 2.4
Name: pgvenv
Version: 0.1.1
Summary: pip install pgvenv
Home-page: https://github.com/Florents-Tselai/pgvenv
Author: Florents Tselai
Author-email: florents.tselai@gmail.com
License: Copyright 2025 Florents Tselai <florents.tselai@gmail.com>
        
        Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
        
        1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
        
        2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
        
        3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: author
Dynamic: author-email
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: requires-python
Dynamic: summary

# Install PostgreSQL with pip install pgvenv

[![Github](https://img.shields.io/static/v1?label=GitHub&message=Repo&logo=GitHub&color=green)](https://github.com/Florents-Tselai/pgvenv)
[![PyPI](https://img.shields.io/pypi/v/pgvenv.svg)](https://pypi.org/project/pgvenv/)
[![pip installs](https://img.shields.io/pypi/dm/pgvenv?label=pip%20installs)](https://pypi.org/project/pgvenv/)

`pgvenv` is a Python package that embeds a fully isolated PostgreSQL installation
in your virtual environmnent.

```shell
pip install pgvenv
```

PostgreSQL will be built from source,
using `--prefix=$VENVPATH`.
Its binaries (`psql`,`pg_config`,`postgres` etc.)
will be put under `venv/bin` along with the `pip`, `python3` binaries.

```shell
python3.11 -m venv ./venv

PGVERSION=17.4 CFLAGS="-O2" PGCONFIGUREFLAGS="--without-icu" \
./venv/bin/pip install pgvenv
```

You can now use your favorite scripts
 
```shell
./venv/bin/pg_config --version # PostgreSQL 17.4
./venv/bin/initdb ./pgdata
./venv/bin/postgres -D ./pgdata
```

## Installation

This requires:

* Autoreconf
* The normal C compiler toolchain, such as gcc and make.
