summaryrefslogtreecommitdiff
path: root/debian
diff options
Diffstat (limited to 'debian')
-rw-r--r--debian/.git-dpm11
-rw-r--r--debian/changelog5
-rw-r--r--debian/compat1
-rw-r--r--debian/control61
-rw-r--r--debian/copyright28
-rw-r--r--debian/patches/0001-From-Takeshi-KOMIYA-i.tkomiya-gmail.com.patch129
-rw-r--r--debian/patches/series1
-rwxr-xr-xdebian/rules12
-rw-r--r--debian/source/format1
-rw-r--r--debian/source/lintian-overrides2
-rw-r--r--debian/watch4
11 files changed, 255 insertions, 0 deletions
diff --git a/debian/.git-dpm b/debian/.git-dpm
new file mode 100644
index 0000000..846ade9
--- /dev/null
+++ b/debian/.git-dpm
@@ -0,0 +1,11 @@
+# see git-dpm(1) from git-dpm package
+659829a63f423c495e6fbcc7a053235426234513
+659829a63f423c495e6fbcc7a053235426234513
+b427257b8230a01eb8c01154fc1cc8f9f67a5419
+b427257b8230a01eb8c01154fc1cc8f9f67a5419
+python-testing.postgresql_1.3.0.orig.tar.gz
+0e08d0bc0b958f90bd30f2d75087a946912af012
+11000
+debianTag="debian/%e%v"
+patchedTag="patched/%e%v"
+upstreamTag="upstream/%e%u"
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..dd953b5
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+python-testing.postgresql (1.3.0-1) unstable; urgency=low
+
+ * Initial release. (Closes: #838582)
+
+ -- Dominik George <nik@naturalnet.de> Thu, 13 Oct 2016 13:56:54 +0200
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..f599e28
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+10
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..65f24b1
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,61 @@
+Source: python-testing.postgresql
+Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
+Uploaders:
+ Dominik George <nik@naturalnet.de>,
+Section: python
+Priority: optional
+Build-Depends:
+ debhelper (>= 10),
+ dh-python,
+ postgresql,
+ python-all (>= 2.6.6-3),
+ python-nose,
+ python-pg8000 (>= 1.10),
+ python-psycopg2,
+ python-setuptools (>= 0.6b3),
+ python-sqlalchemy,
+ python-testing.common.database (>= 1.1.0),
+ python3-all,
+ python3-nose,
+ python3-pg8000 (>= 1.10),
+ python3-psycopg2,
+ python3-setuptools,
+ python3-sqlalchemy,
+ python3-testing.common.database (>= 1.1.0),
+Standards-Version: 3.9.8
+Homepage: https://github.com/tk0miya/testing.postgresql
+Testsuite: autopkgtest-pkg-python
+Vcs-Git: https://anonscm.debian.org/git/python-modules/packages/python-testing.postgresql.git
+Vcs-Browser: https://anonscm.debian.org/git/python-modules/packages/python-testing.postgresql.git
+
+Package: python-testing.postgresql
+Architecture: all
+Depends:
+ postgresql,
+ ${misc:Depends},
+ ${python:Depends},
+Description: Python testing.* framework - PostgreSQL helpers (Python 2)
+ The testing.* Python modules provide a framework for Python unit test suites
+ that need to run tests against servers, like network-based DBMSs.
+ .
+ testing.postgresql contains helper classes to work with a temporary
+ PostgreSQL server. It automatically sets up a PostgreSQL instance in a
+ temporary directory, and destroys it after testing.
+ .
+ This package contains the Python 2 version.
+
+Package: python3-testing.postgresql
+Architecture: all
+Depends:
+ postgresql,
+ ${misc:Depends},
+ ${python3:Depends},
+Description: Python testing.* framework - PostgreSQL helpers (Python 3)
+ The testing.* Python modules provide a framework for Python unit test suites
+ that need to run tests against servers, like network-based DBMSs.
+ .
+ testing.postgresql contains helper classes to work with a temporary
+ PostgreSQL server. It automatically sets up a PostgreSQL instance in a
+ temporary directory, and destroys it after testing.
+ .
+ This package contains the Python 3 version.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..2402168
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,28 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: testing.postgresql
+Upstream-Contact: Takeshi KOMIYA <i.tkomiya@gmail.com>
+Source: https://github.com/tk0miya/testing.postgresql
+
+Files: *
+Copyright: 2013 Takeshi KOMIYA <i.tkomiya@gmail.com>
+License: Apache-2.0
+
+Files: debian/*
+Copyright: 2016 Dominik George <nik@naturalnet.de>
+License: Apache-2.0
+
+License: Apache-2.0
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ .
+ http://www.apache.org/licenses/LICENSE-2.0
+ .
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ .
+ On Debian systems, you can find the Apache-2.0 license under
+ /usr/share/common-licenses/Apache-2.0 .
diff --git a/debian/patches/0001-From-Takeshi-KOMIYA-i.tkomiya-gmail.com.patch b/debian/patches/0001-From-Takeshi-KOMIYA-i.tkomiya-gmail.com.patch
new file mode 100644
index 0000000..2dd13b7
--- /dev/null
+++ b/debian/patches/0001-From-Takeshi-KOMIYA-i.tkomiya-gmail.com.patch
@@ -0,0 +1,129 @@
+From 659829a63f423c495e6fbcc7a053235426234513 Mon Sep 17 00:00:00 2001
+From: Dominik George <nik@naturalnet.de>
+Date: Thu, 13 Oct 2016 13:40:10 +0200
+Subject: =?UTF-8?q?From:=20Takeshi=20KOMIYA=20<i.tkomiya@gmail.com>=0ADate?=
+ =?UTF-8?q?:=20Fri,=205=20Feb=202016=2021:56:57=20+0900=0ASubject:=20[PATC?=
+ =?UTF-8?q?H]=20Use=20utility=20methods=20of=20testing.common.database=20>?=
+ =?UTF-8?q?=3D=201.1.0=0AOrigin:=20upstream,=20https://github.com/tk0miya/?=
+ =?UTF-8?q?testing.postgresql/commit/738c8eb19a4b064dd74ff851c379dd1cbf11b?=
+ =?UTF-8?q?c65.patch=0AApplied-Upstream:=20commit:738c8eb19a4b064dd74ff851?=
+ =?UTF-8?q?c379dd1cbf11bc65?=
+
+---
+ setup.py | 2 +-
+ tests/test_postgresql.py | 41 ++++++++++++++---------------------------
+ 2 files changed, 15 insertions(+), 28 deletions(-)
+
+diff --git a/setup.py b/setup.py
+index 08095cd..9e95298 100644
+--- a/setup.py
++++ b/setup.py
+@@ -18,7 +18,7 @@ classifiers = [
+ "Topic :: Software Development :: Testing",
+ ]
+
+-install_requires = ['testing.common.database', 'pg8000 >= 1.10']
++install_requires = ['testing.common.database >= 1.1.0', 'pg8000 >= 1.10']
+ if sys.version_info < (2, 7):
+ install_requires.append('unittest2')
+
+diff --git a/tests/test_postgresql.py b/tests/test_postgresql.py
+index 29e2b7e..b3603a2 100644
+--- a/tests/test_postgresql.py
++++ b/tests/test_postgresql.py
+@@ -47,38 +47,31 @@ class TestPostgresql(unittest.TestCase):
+ conn.close()
+ finally:
+ # shutting down
+- pid = pgsql.pid
+- self.assertTrue(pid)
+- os.kill(pid, 0) # process is alive
++ pid = pgsql.server_pid
++ self.assertTrue(pgsql.is_alive())
+
+ pgsql.stop()
+ sleep(1)
+
+- self.assertIsNone(pgsql.pid)
++ self.assertFalse(pgsql.is_alive())
+ with self.assertRaises(OSError):
+ os.kill(pid, 0) # process is down
+
+ def test_stop(self):
+ # start postgresql server
+ pgsql = testing.postgresql.Postgresql()
+- self.assertIsNotNone(pgsql.pid)
+ self.assertTrue(os.path.exists(pgsql.base_dir))
+- pid = pgsql.pid
+- os.kill(pid, 0) # process is alive
++ self.assertTrue(pgsql.is_alive())
+
+ # call stop()
+ pgsql.stop()
+- self.assertIsNone(pgsql.pid)
+ self.assertFalse(os.path.exists(pgsql.base_dir))
+- with self.assertRaises(OSError):
+- os.kill(pid, 0) # process is down
++ self.assertFalse(pgsql.is_alive())
+
+ # call stop() again
+ pgsql.stop()
+- self.assertIsNone(pgsql.pid)
+ self.assertFalse(os.path.exists(pgsql.base_dir))
+- with self.assertRaises(OSError):
+- os.kill(pid, 0) # process is down
++ self.assertFalse(pgsql.is_alive())
+
+ # delete postgresql object after stop()
+ del pgsql
+@@ -98,20 +91,17 @@ class TestPostgresql(unittest.TestCase):
+ self.assertIsNotNone(conn)
+ conn.close()
+
+- pid = pgsql.pid
+- os.kill(pid, 0) # process is alive
++ self.assertTrue(pgsql.is_alive())
+
+- self.assertIsNone(pgsql.pid)
+- with self.assertRaises(OSError):
+- os.kill(pid, 0) # process is down
++ self.assertFalse(pgsql.is_alive())
+
+ def test_multiple_postgresql(self):
+ pgsql1 = testing.postgresql.Postgresql()
+ pgsql2 = testing.postgresql.Postgresql()
+- self.assertNotEqual(pgsql1.pid, pgsql2.pid)
++ self.assertNotEqual(pgsql1.server_pid, pgsql2.server_pid)
+
+- os.kill(pgsql1.pid, 0) # process is alive
+- os.kill(pgsql2.pid, 0) # process is alive
++ self.assertTrue(pgsql1.is_alive())
++ self.assertTrue(pgsql2.is_alive())
+
+ def test_postgresql_is_not_found(self):
+ try:
+@@ -135,21 +125,18 @@ class TestPostgresql(unittest.TestCase):
+ else:
+ os.wait()
+ sleep(1)
+- self.assertTrue(pgsql.pid)
+- os.kill(pgsql.pid, 0) # process is alive (delete pgsql obj in child does not effect)
++ self.assertTrue(pgsql.is_alive()) # process is alive (delete pgsql obj in child does not effect)
+
+ def test_stop_on_child_process(self):
+ pgsql = testing.postgresql.Postgresql()
+ if os.fork() == 0:
+ pgsql.stop()
+- self.assertTrue(pgsql.pid)
+- os.kill(pgsql.pid, 0) # process is alive (calling stop() is ignored)
++ os.kill(pgsql.server_pid, 0) # process is alive (calling stop() is ignored)
+ os.kill(os.getpid(), signal.SIGTERM) # exit tests FORCELY
+ else:
+ os.wait()
+ sleep(1)
+- self.assertTrue(pgsql.pid)
+- os.kill(pgsql.pid, 0) # process is alive (calling stop() in child is ignored)
++ self.assertTrue(pgsql.is_alive()) # process is alive (calling stop() in child is ignored)
+
+ def test_copy_data_from(self):
+ try:
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..7bddafa
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-From-Takeshi-KOMIYA-i.tkomiya-gmail.com.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..5a940b1
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,12 @@
+#!/usr/bin/make -f
+
+export PYBUILD_NAME=testing.postgresql
+%:
+ dh $@ --with python2,python3 --buildsystem=pybuild
+
+override_dh_installchangelogs:
+ csplit README.rst '%^History$$%'
+ dh_installchangelogs xx00
+
+override_dh_clean:
+ dh_clean xx00
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides
new file mode 100644
index 0000000..32d5859
--- /dev/null
+++ b/debian/source/lintian-overrides
@@ -0,0 +1,2 @@
+# Upstream does not sign tarballs. Discussing that, though.
+python-testing.postgresql source: debian-watch-may-check-gpg-signature
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..b932fb2
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,4 @@
+# please also check http://pypi.debian.net/testing.postgresql/watch
+version=3
+opts="uversionmangle=s/(rc|a|b|c)/~$1/" \
+http://pypi.debian.net/testing.postgresql/testing.postgresql-(.+)\.(?:zip|tgz|tbz|txz|(?:tar\.(?:gz|bz2|xz)))