[arch-commits] Commit in python-pg8000/repos/community-any (PKGBUILD PKGBUILD)

Chih-Hsuan Yen yan12125 at archlinux.org
Thu May 6 04:35:42 UTC 2021


    Date: Thursday, May 6, 2021 @ 04:35:41
  Author: yan12125
Revision: 928359

archrelease: copy trunk to community-any

Added:
  python-pg8000/repos/community-any/PKGBUILD
    (from rev 928358, python-pg8000/trunk/PKGBUILD)
Deleted:
  python-pg8000/repos/community-any/PKGBUILD

----------+
 PKGBUILD |  156 ++++++++++++++++++++++++++++++-------------------------------
 1 file changed, 78 insertions(+), 78 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2021-05-06 04:35:30 UTC (rev 928358)
+++ PKGBUILD	2021-05-06 04:35:41 UTC (rev 928359)
@@ -1,78 +0,0 @@
-# Maintainer: Chih-Hsuan Yen <yan12125 at archlinux.org>
-# Contributor: quomoow <quomoow at gmail.com>
-
-pkgname=python-pg8000
-pkgver=1.19.2
-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-pytest-benchmark
-              python-pytz postgresql)
-depends=(python python-scramp)
-source=("https://files.pythonhosted.org/packages/source/p/pg8000/pg8000-$pkgver.tar.gz"{,.asc})
-sha256sums=('44cbb4d3c912f2da167ca02bf98a0040f7e93260e4ef114c28d5d6152012ea07'
-            'SKIP')
-validpgpkeys=(
-  'D5681B7EC7292511C4CC1450892B00AB699851E8'  # Tony Locke <tlocke at tlocke.org.uk>, proven by https://keybase.io/tlocke
-)
-
-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
-
-  export PGDATA="$srcdir/postgres-testdata"
-  export PGHOST=127.0.0.1
-  export PGPORT=$((49152+$RANDOM%10000))
-
-  # See https://github.com/tlocke/pg8000#tests about database initialization steps for testing
-  initdb --username=postgres --auth=trust
-  openssl req -subj "/CN=self-signed" -nodes -x509 -newkey rsa:4096 -days 1 -keyout "$PGDATA/self-signed.key" -out "$PGDATA/self-signed.crt"
-  cat <<EOF >> "$PGDATA/postgresql.conf"
-ssl = on
-ssl_cert_file = 'self-signed.crt'
-ssl_key_file = 'self-signed.key'
-password_encryption = 'scram-sha-256'
-EOF
-
-  pg_ctl start -o "-k '' -h $PGHOST -p $PGPORT" -l "$srcdir/postgresql.log"
-  # Change the password for postgres after password_encryption is specified, so that the role has a valid SCRAM secret
-  psql -U postgres -c "
-    CREATE EXTENSION hstore;
-    ALTER ROLE postgres PASSWORD 'pw';
-  "
-
-  # should overwrite pg_hba.conf, or unexpected matches may happen against existing entries
-  cat <<EOF > "$PGDATA/pg_hba.conf"
-host    pg8000_md5      all             127.0.0.1/32            md5
-host    pg8000_gss      all             127.0.0.1/32            gss
-host    pg8000_password all             127.0.0.1/32            password
-host    pg8000_scram_sha_256 all        127.0.0.1/32            scram-sha-256
-host    all             all             127.0.0.1/32            trust
-EOF
-  pg_ctl reload
-  # Upstream tests require LANG=en_GB.UTF-8 or LANG=C.UTF-8 :/
-  # https://github.com/tlocke/pg8000/blob/1.19.2/test/native/test_typeconversion.py#L455-L458
-  PYTHONPATH="$PWD" LANG=C.UTF-8 pytest test
-  pg_ctl stop
-}
-
-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 928358, python-pg8000/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2021-05-06 04:35:41 UTC (rev 928359)
@@ -0,0 +1,78 @@
+# Maintainer: Chih-Hsuan Yen <yan12125 at archlinux.org>
+# Contributor: quomoow <quomoow at gmail.com>
+
+pkgname=python-pg8000
+pkgver=1.19.4
+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-pytest-benchmark
+              python-pytz postgresql)
+depends=(python python-scramp)
+source=("https://files.pythonhosted.org/packages/source/p/pg8000/pg8000-$pkgver.tar.gz"{,.asc})
+sha256sums=('7c9c6d57541b0f2153e23a8d759ceb3d7cb9308918fba6ad9e92f8e0e5a90bc8'
+            'SKIP')
+validpgpkeys=(
+  'D5681B7EC7292511C4CC1450892B00AB699851E8'  # Tony Locke <tlocke at tlocke.org.uk>, proven by https://keybase.io/tlocke
+)
+
+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
+
+  export PGDATA="$srcdir/postgres-testdata"
+  export PGHOST=127.0.0.1
+  export PGPORT=$((49152+$RANDOM%10000))
+
+  # See https://github.com/tlocke/pg8000#tests about database initialization steps for testing
+  initdb --username=postgres --auth=trust
+  openssl req -subj "/CN=self-signed" -nodes -x509 -newkey rsa:4096 -days 1 -keyout "$PGDATA/self-signed.key" -out "$PGDATA/self-signed.crt"
+  cat <<EOF >> "$PGDATA/postgresql.conf"
+ssl = on
+ssl_cert_file = 'self-signed.crt'
+ssl_key_file = 'self-signed.key'
+password_encryption = 'scram-sha-256'
+EOF
+
+  pg_ctl start -o "-k '' -h $PGHOST -p $PGPORT" -l "$srcdir/postgresql.log"
+  # Change the password for postgres after password_encryption is specified, so that the role has a valid SCRAM secret
+  psql -U postgres -c "
+    CREATE EXTENSION hstore;
+    ALTER ROLE postgres PASSWORD 'pw';
+  "
+
+  # should overwrite pg_hba.conf, or unexpected matches may happen against existing entries
+  cat <<EOF > "$PGDATA/pg_hba.conf"
+host    pg8000_md5      all             127.0.0.1/32            md5
+host    pg8000_gss      all             127.0.0.1/32            gss
+host    pg8000_password all             127.0.0.1/32            password
+host    pg8000_scram_sha_256 all        127.0.0.1/32            scram-sha-256
+host    all             all             127.0.0.1/32            trust
+EOF
+  pg_ctl reload
+  # Upstream tests require LANG=en_GB.UTF-8 or LANG=C.UTF-8 :/
+  # https://github.com/tlocke/pg8000/blob/1.19.2/test/native/test_typeconversion.py#L455-L458
+  PYTHONPATH="$PWD" LANG=C.UTF-8 pytest test
+  pg_ctl stop
+}
+
+package() {
+  cd pg8000-$pkgver
+  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname
+}



More information about the arch-commits mailing list