[arch-commits] Commit in python-subunit2sql/repos/community-staging-any (3 files)

Felix Yan felixonmars at archlinux.org
Wed Nov 6 15:26:05 UTC 2019


    Date: Wednesday, November 6, 2019 @ 15:26:05
  Author: felixonmars
Revision: 524400

archrelease: copy trunk to community-staging-any

Added:
  python-subunit2sql/repos/community-staging-any/PKGBUILD
    (from rev 524399, python-subunit2sql/trunk/PKGBUILD)
  python-subunit2sql/repos/community-staging-any/fix-migrations-test.patch
    (from rev 524399, python-subunit2sql/trunk/fix-migrations-test.patch)
Deleted:
  python-subunit2sql/repos/community-staging-any/PKGBUILD

---------------------------+
 PKGBUILD                  |  137 ++++++++++++++++++++++----------------------
 fix-migrations-test.patch |   93 +++++++++++++++++++++++++++++
 2 files changed, 163 insertions(+), 67 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2019-11-06 15:25:46 UTC (rev 524399)
+++ PKGBUILD	2019-11-06 15:26:05 UTC (rev 524400)
@@ -1,67 +0,0 @@
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
-
-pkgbase=python-subunit2sql
-pkgname=(python-subunit2sql python2-subunit2sql)
-pkgver=1.10.0
-pkgrel=2
-pkgdesc="Command to Read a subunit file or stream and put the data in a SQL DB"
-arch=('any')
-url="https://pypi.python.org/pypi/subunit2sql"
-license=('Apache')
-makedepends=('python-setuptools' 'python2-setuptools' 'python-pbr' 'python2-pbr' 'python-alembic'
-             'python2-alembic' 'python-stevedore' 'python2-stevedore' 'python-sqlalchemy'
-             'python2-sqlalchemy' 'python-oslo-config' 'python2-oslo-config' 'python-dateutil'
-             'python2-dateutil' 'python-subunit' 'python2-subunit' 'python-oslo-db'
-             'python2-oslo-db')
-checkdepends=('python-stestr' 'python2-stestr' 'python-mock' 'python2-mock'
-              'python-testresources' 'python2-testresources' 'python-testscenarios'
-              'python2-testscenarios' 'python-oslo-concurrency' 'python2-oslo-concurrency'
-              'pifpaf' 'percona-server' 'mariadb-clients' 'postgresql')
-source=("$pkgbase-$pkgver.tar.gz::https://github.com/openstack-infra/subunit2sql/archive/$pkgver.tar.gz")
-sha512sums=('8efe7f53606a4927f1bb97a9329e1d25c16baad32a64ea7df59cc4958af9111c5227e29c205f5bbf8d5fbd1babc0a6242fd067e00bfa1e06e32aeca17c065363')
-
-prepare() {
-  cp -a subunit2sql-$pkgver{,-py2}
-
-  export PBR_VERSION=$pkgver
-}
-
-build() {
-  cd "$srcdir"/subunit2sql-$pkgver
-  python setup.py build
-
-  cd "$srcdir"/subunit2sql-$pkgver-py2
-  python2 setup.py build
-}
-
-check() {
-  cd "$srcdir"/subunit2sql-$pkgver
-  pifpaf run mysql pifpaf run postgresql stestr run
-
-  cd "$srcdir"/subunit2sql-$pkgver-py2
-  PYTHON=python2 pifpaf run mysql pifpaf run postgresql stestr2 run
-}
-
-package_python-subunit2sql() {
-  depends=('python-six' 'python-pbr' 'python-alembic' 'python-stevedore' 'python-sqlalchemy'
-           'python-oslo-config' 'python-dateutil' 'python-subunit' 'python-oslo-db')
-
-  cd "$srcdir"/subunit2sql-$pkgver
-  python setup.py install --root="$pkgdir" --optimize=1
-}
-
-package_python2-subunit2sql() {
-  depends=('python2-six' 'python2-pbr' 'python2-alembic' 'python2-stevedore' 'python2-sqlalchemy'
-           'python2-oslo-config' 'python2-dateutil' 'python2-subunit' 'python2-oslo-db')
-
-  cd "$srcdir"/subunit2sql-$pkgver-py2
-  python2 setup.py install --root="$pkgdir" --optimize=1
-
-  mv "$pkgdir"/usr/bin/sql2subunit{,2}
-  mv "$pkgdir"/usr/bin/subunit2sql{,2}
-  mv "$pkgdir"/usr/bin/subunit2sql-db-manage{,2}
-  mv "$pkgdir"/usr/bin/subunit2sql-graph{,2}
-}
-
-# vim:set ts=2 sw=2 et:

Copied: python-subunit2sql/repos/community-staging-any/PKGBUILD (from rev 524399, python-subunit2sql/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2019-11-06 15:26:05 UTC (rev 524400)
@@ -0,0 +1,70 @@
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>
+
+pkgbase=python-subunit2sql
+pkgname=(python-subunit2sql python2-subunit2sql)
+pkgver=1.10.0
+pkgrel=3
+pkgdesc="Command to Read a subunit file or stream and put the data in a SQL DB"
+arch=('any')
+url="https://pypi.python.org/pypi/subunit2sql"
+license=('Apache')
+makedepends=('python-setuptools' 'python2-setuptools' 'python-pbr' 'python2-pbr' 'python-alembic'
+             'python2-alembic' 'python-stevedore' 'python2-stevedore' 'python-sqlalchemy'
+             'python2-sqlalchemy' 'python-oslo-config' 'python2-oslo-config' 'python-dateutil'
+             'python2-dateutil' 'python-subunit' 'python2-subunit' 'python-oslo-db'
+             'python2-oslo-db')
+checkdepends=('python-stestr' 'python2-stestr' 'python-mock' 'python2-mock'
+              'python-testresources' 'python2-testresources' 'python-testscenarios'
+              'python2-testscenarios' 'python-oslo-concurrency' 'python2-oslo-concurrency'
+              'pifpaf' 'percona-server' 'mariadb-clients' 'postgresql')
+source=("$pkgbase-$pkgver.tar.gz::https://github.com/openstack-infra/subunit2sql/archive/$pkgver.tar.gz"
+        fix-migrations-test.patch)
+sha512sums=('8efe7f53606a4927f1bb97a9329e1d25c16baad32a64ea7df59cc4958af9111c5227e29c205f5bbf8d5fbd1babc0a6242fd067e00bfa1e06e32aeca17c065363'
+            '0891880f0ff329a4236a73f88a90ffc4522c123b52e08675609816649934b20fc7ccbd9d5141341bc7a96c6acd32e40b227e61634fbd803e8b7c659e42ea0668')
+
+prepare() {
+  patch -Np1 -d subunit2sql-$pkgver <fix-migrations-test.patch
+  cp -a subunit2sql-$pkgver{,-py2}
+
+  export PBR_VERSION=$pkgver
+}
+
+build() {
+  cd "$srcdir"/subunit2sql-$pkgver
+  python setup.py build
+
+  cd "$srcdir"/subunit2sql-$pkgver-py2
+  python2 setup.py build
+}
+
+check() {
+  cd "$srcdir"/subunit2sql-$pkgver
+  pifpaf run mysql pifpaf run postgresql stestr run
+
+  cd "$srcdir"/subunit2sql-$pkgver-py2
+  PYTHON=python2 pifpaf run mysql pifpaf run postgresql stestr2 run
+}
+
+package_python-subunit2sql() {
+  depends=('python-six' 'python-pbr' 'python-alembic' 'python-stevedore' 'python-sqlalchemy'
+           'python-oslo-config' 'python-dateutil' 'python-subunit' 'python-oslo-db')
+
+  cd "$srcdir"/subunit2sql-$pkgver
+  python setup.py install --root="$pkgdir" --optimize=1
+}
+
+package_python2-subunit2sql() {
+  depends=('python2-six' 'python2-pbr' 'python2-alembic' 'python2-stevedore' 'python2-sqlalchemy'
+           'python2-oslo-config' 'python2-dateutil' 'python2-subunit' 'python2-oslo-db')
+
+  cd "$srcdir"/subunit2sql-$pkgver-py2
+  python2 setup.py install --root="$pkgdir" --optimize=1
+
+  mv "$pkgdir"/usr/bin/sql2subunit{,2}
+  mv "$pkgdir"/usr/bin/subunit2sql{,2}
+  mv "$pkgdir"/usr/bin/subunit2sql-db-manage{,2}
+  mv "$pkgdir"/usr/bin/subunit2sql-graph{,2}
+}
+
+# vim:set ts=2 sw=2 et:

Copied: python-subunit2sql/repos/community-staging-any/fix-migrations-test.patch (from rev 524399, python-subunit2sql/trunk/fix-migrations-test.patch)
===================================================================
--- fix-migrations-test.patch	                        (rev 0)
+++ fix-migrations-test.patch	2019-11-06 15:26:05 UTC (rev 524400)
@@ -0,0 +1,93 @@
+From 99f770ca133c0d079532e4eefa519555d546164a Mon Sep 17 00:00:00 2001
+From: Masayuki Igawa <masayuki at igawa.io>
+Date: Thu, 18 Jul 2019 11:07:38 +0900
+Subject: [PATCH] Fix gate error "mysqladmin: command not found" and etc
+
+mysqladmin package is required in tools/test-setup.sh
+so adding bindep.txt file for this binary dependencies. And postgresql
+packages are also required as well.
+
+- http://lists.openstack.org/pipermail/openstack-discuss/2019-June/007272.html
+
+This commit also updated sphinx versions in test-requirements.txt to
+avoid this error.
+
+  ERROR: Sphinx requires Python '>=3.5' but the running Python is 2.7.15
+
+And also, this commit fixes a sqlalchemy error. This probably caused by
+sqlalchemy version updates. It might be better to fix the code rather
+than the sqlalchemy version cap.
+
+  sqlalchemy.exc.ArgumentError: Textual SQL expression
+    "tests.id='fake_null_test_..." should be explicitly declared as
+    text("tests.id='fake_null_test_...")
+
+Change-Id: Iff79081403fbc26442165ff5feb300bc317b0dfc
+---
+ bindep.txt                                      |  8 ++++++++
+ subunit2sql/tests/migrations/test_migrations.py |  2 +-
+ test-requirements.txt                           |  3 ++-
+ tox.ini                                         | 11 +++++++++++
+ 4 files changed, 22 insertions(+), 2 deletions(-)
+ create mode 100644 bindep.txt
+
+diff --git a/bindep.txt b/bindep.txt
+new file mode 100644
+index 0000000..2f11192
+--- /dev/null
++++ b/bindep.txt
+@@ -0,0 +1,8 @@
++# This is a cross-platform list tracking distribution packages needed by tests;
++# see http://docs.openstack.org/infra/bindep/ for additional information.
++
++mysql-client [platform:dpkg]
++mysql-server [platform:dpkg]
++postgresql
++postgresql-client [platform:dpkg]
++postgresql-server-dev-all [platform:dpkg]
+diff --git a/subunit2sql/tests/migrations/test_migrations.py b/subunit2sql/tests/migrations/test_migrations.py
+index 483d0aa..5df7067 100644
+--- a/subunit2sql/tests/migrations/test_migrations.py
++++ b/subunit2sql/tests/migrations/test_migrations.py
+@@ -321,7 +321,7 @@ class TestWalkMigrations(base.TestCase):
+         test_ids = [data['tests'][x]['id'] for x in data['tests']]
+         # Query the DB for the tests from the sample dataset above
+         where = ' OR '.join(["tests.id='%s'" % x for x in test_ids])
+-        result = tests.select(where).execute()
++        result = tests.select(sqlalchemy.sql.text(where)).execute()
+         run_time_pairs = list(map(lambda x: (x['id'], x['run_time']), result))
+         # Ensure the test with one failure is None
+         self.assertIn(('fake_null_test_id_fails', None), run_time_pairs)
+diff --git a/test-requirements.txt b/test-requirements.txt
+index 319d05c..fcf5c13 100644
+--- a/test-requirements.txt
++++ b/test-requirements.txt
+@@ -2,7 +2,8 @@ hacking>=0.12.0,!=0.13.0,<0.14
+ coverage>=3.6
+ fixtures>=0.3.14
+ mock>=1.0
+-sphinx>=1.6.2 # BSD
++sphinx!=1.6.6,!=1.6.7,<2.0.0;python_version=='2.7'  # BSD
++sphinx!=1.6.6,!=1.6.7,!=2.1.0;python_version>='3.4'  # BSD
+ testscenarios>=0.4
+ stestr>=1.0.0
+ testtools>=0.9.34
+diff --git a/tox.ini b/tox.ini
+index ae8b00d..8befe6f 100644
+--- a/tox.ini
++++ b/tox.ini
+@@ -63,3 +63,14 @@ commands =
+ [testenv:releasenotes]
+ basepython = python3
+ commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
++
++[testenv:bindep]
++# Do not install any requirements. We want this to be fast and work even if
++# system dependencies are missing, since it's used to tell you what system
++# dependencies are missing! This also means that bindep must be installed
++# separately, outside of the requirements files, and develop mode disabled
++# explicitly to avoid unnecessarily installing the checked-out repo too (this
++# further relies on "tox.skipsdist = True" above).
++usedevelop = False
++deps = bindep
++commands = bindep test



More information about the arch-commits mailing list