Skip to content

Commit e0faeb3

Browse files
committed
Include installation from a sparse checkout excluding the usual packaging files.
1 parent fb1ed35 commit e0faeb3

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,19 @@ From a clone:
3333
$ cd fe
3434
$ python3 ./setup.py install # Or use in-place without installation(PYTHONPATH).
3535

36+
Direct from a sparse checkout:
37+
38+
export BRANCH=v1.3
39+
export TARGET="$(pwd)/py-packages"
40+
export PYTHONPATH="$PYTHONPATH:$TARGET"
41+
git clone --origin=pypg-frontend --branch=$BRANCH \
42+
--sparse --filter=blob:none --no-checkout --depth=1 \
43+
https://github.com/python-postgres/fe.git "$TARGET"
44+
pushd "$TARGET"
45+
git sparse-checkout set --no-cone postgresql
46+
git switch $BRANCH
47+
popd; unset TARGET BRANCH
48+
3649
### Basic Usage
3750

3851
```python
@@ -48,6 +61,10 @@ with db.xact():
4861
print(x)
4962
```
5063

64+
REPL with connection bound to `db` builtin:
65+
66+
python3 -m postgresql.bin.pg_python -I 'pq://postgres@localhost:5423/postgres'
67+
5168
### Documentation
5269

5370
- https://py-postgresql.readthedocs.io

0 commit comments

Comments
 (0)