[arch-commits] Commit in python-pg8000/repos/community-any (3 files)
Chih-Hsuan Yen
yan12125 at archlinux.org
Mon Jul 13 02:27:36 UTC 2020
Date: Monday, July 13, 2020 @ 02:27:35
Author: yan12125
Revision: 663397
archrelease: copy trunk to community-any
Added:
python-pg8000/repos/community-any/PKGBUILD
(from rev 663396, python-pg8000/trunk/PKGBUILD)
python-pg8000/repos/community-any/postgresql-12.diff
(from rev 663396, python-pg8000/trunk/postgresql-12.diff)
Deleted:
python-pg8000/repos/community-any/PKGBUILD
--------------------+
PKGBUILD | 93 +++++++++++++++++++++++++++++----------------------
postgresql-12.diff | 17 +++++++++
2 files changed, 70 insertions(+), 40 deletions(-)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2020-07-13 02:27:15 UTC (rev 663396)
+++ PKGBUILD 2020-07-13 02:27:35 UTC (rev 663397)
@@ -1,40 +0,0 @@
-# Maintainer: Chih-Hsuan Yen <yan12125 at archlinux.org>
-# Contributor: quomoow <quomoow at gmail.com>
-
-pkgname=python-pg8000
-pkgver=1.15.3
-pkgrel=1
-pkgdesc="Pure-Python PostgreSQL database driver, DB-API compatible"
-arch=(any)
-url='https://github.com/tlocke/pg8000'
-license=(BSD)
-makedepends=(python-setuptools)
-checkdepends=(python-pytest python-pytz pifpaf postgresql)
-depends=(python python-scramp)
-source=("https://github.com/tlocke/pg8000/archive/$pkgver/pg8000-$pkgver.tar.gz")
-sha256sums=('919793109ac0c02e073eae7a845647658b4eb8967f860a878295150cb0999e5e')
-
-prepare() {
- cd pg8000-$pkgver
-
- # Remove upper bounds of dependencies
- sed --in-place=.orig -r 's#,?<[0-9.]+,?##;s#==([0-9.]+)#>=\1#' setup.py
- diff -u setup.py{.orig,} || true
-}
-
-build() {
- cd pg8000-$pkgver
- python setup.py build
-}
-
-check() {
- cd pg8000-$pkgver
- # TODO
- PYTHONPATH="$PWD" pifpaf run postgresql -- pytest -v test || echo Tests fail!
-}
-
-package() {
- cd pg8000-$pkgver
- python setup.py install --root="$pkgdir" --optimize=1 --skip-build
- install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
-}
Copied: python-pg8000/repos/community-any/PKGBUILD (from rev 663396, python-pg8000/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2020-07-13 02:27:35 UTC (rev 663397)
@@ -0,0 +1,53 @@
+# Maintainer: Chih-Hsuan Yen <yan12125 at archlinux.org>
+# Contributor: quomoow <quomoow at gmail.com>
+
+pkgname=python-pg8000
+pkgver=1.16.0
+pkgrel=1
+pkgdesc="Pure-Python PostgreSQL database driver, DB-API compatible"
+arch=(any)
+url='https://github.com/tlocke/pg8000'
+license=(BSD)
+makedepends=(python-setuptools)
+checkdepends=(python-pytest python-pytest-mock python-pytz pifpaf postgresql)
+depends=(python python-scramp)
+source=("https://github.com/tlocke/pg8000/archive/$pkgver/pg8000-$pkgver.tar.gz"
+ postgresql-12.diff)
+sha256sums=('dbba2061f4e5f7a405bdd7839ddfd1e180b1a4844279f21eb77bed3808bee4af'
+ '31693ddabeb8d772949ecbfd0f917223802be85039a613e083ecdeee417576db')
+
+prepare() {
+ cd pg8000-$pkgver
+
+ # https://github.com/tlocke/pg8000/issues/46
+ patch -Np1 -i ../postgresql-12.diff
+
+ # Remove upper bounds of dependencies
+ sed --in-place=.orig -r 's#,?<[0-9.]+,?##;s#==([0-9.]+)#>=\1#' setup.py
+ diff -u setup.py{.orig,} || true
+}
+
+build() {
+ cd pg8000-$pkgver
+ python setup.py build
+}
+
+check() {
+ cd pg8000-$pkgver
+ # See upstream .travis.yml for initialization SQL commands
+ # XXX: The postgres plugin in pifpaf does not listen on a TCP port
+ # without --host
+ # XXX: testGss and testSsl needs custom pg_hba.conf and postgresql.conf,
+ # and pifpaf does not support that yet
+ PYTHONPATH="$PWD" pifpaf run postgresql --host localhost -- bash -c "
+ psql -c \"CREATE ROLE postgres WITH LOGIN SUPERUSER PASSWORD 'pw';\"
+ psql -c \"create extension hstore;\"
+ pytest -v test -k 'not testGss and not testSsl'
+ "
+}
+
+package() {
+ cd pg8000-$pkgver
+ python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+ install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
+}
Copied: python-pg8000/repos/community-any/postgresql-12.diff (from rev 663396, python-pg8000/trunk/postgresql-12.diff)
===================================================================
--- postgresql-12.diff (rev 0)
+++ postgresql-12.diff 2020-07-13 02:27:35 UTC (rev 663397)
@@ -0,0 +1,17 @@
+diff --git a/test/test_copy.py b/test/test_copy.py
+index e46b8d2..847fef3 100644
+--- a/test/test_copy.py
++++ b/test/test_copy.py
+@@ -71,10 +71,10 @@ def test_copy_from_with_error(db_table):
+ arg = {
+ 'S': 'ERROR',
+ 'C': '22P02',
+- 'M': 'invalid input syntax for integer: ""',
++ 'M': 'invalid input syntax for type integer: ""',
+ 'W': 'COPY t1, line 2, column f1: ""',
+ 'F': 'numutils.c',
+- 'R': 'pg_atoi'
++ 'R': 'pg_strtoint32'
+ }
+ earg = e.value.args[0]
+ for k, v in arg.items():
More information about the arch-commits
mailing list