[Python-modules-commits] [python-distro] 01/01: d/control: Depend on lsb-release for better information gathering.

Barry Warsaw barry at moszumanska.debian.org
Tue Nov 29 17:06:41 UTC 2016


This is an automated email from the git hooks/post-receive script.

barry pushed a commit to branch master
in repository python-distro.

commit 13ea0c15cb033bf30bab323d7d5b4a11be7dbb57
Author: Barry Warsaw <barry at python.org>
Date:   Tue Nov 29 12:06:37 2016 -0500

    d/control: Depend on lsb-release for better information gathering.
---
 debian/changelog      |  7 +++++++
 debian/control        |  8 +++++---
 debian/tests/api-2.py | 14 ++++++++++++++
 debian/tests/api-3.py | 14 ++++++++++++++
 debian/tests/control  | 11 +++++++++++
 5 files changed, 51 insertions(+), 3 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index b32d5f5..2059252 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+python-distro (1.0.1-2) UNRELEASED; urgency=medium
+
+  * d/control: Depend on lsb-release for better information gathering.
+  * d/tests: Added.
+
+ -- Barry Warsaw <barry at debian.org>  Tue, 29 Nov 2016 10:33:24 -0500
+
 python-distro (1.0.1-1) unstable; urgency=medium
 
   * Initial release. (Closes: #846155)
diff --git a/debian/control b/debian/control
index c65b3e2..fed8979 100644
--- a/debian/control
+++ b/debian/control
@@ -16,8 +16,9 @@ Vcs-Browser: https://anonscm.debian.org/cgit/python-modules/packages/python-dist
 
 Package: python-distro
 Architecture: all
-Depends: ${misc:Depends},
-         ${python:Depends}
+Depends: lsb-release,
+         ${misc:Depends},
+         ${python:Depends},
 Description: Linux OS platform information API
  distro (for: Linux Distribution) provides information about the Linux
  distribution it runs on, such as a reliable machine-readable ID, or version
@@ -32,7 +33,8 @@ Description: Linux OS platform information API
 
 Package: python3-distro
 Architecture: all
-Depends: ${misc:Depends},
+Depends: lsb-release,
+         ${misc:Depends},
          ${python3:Depends},
 Description: Linux OS platform information API
  distro (for: Linux Distribution) provides information about the Linux
diff --git a/debian/tests/api-2.py b/debian/tests/api-2.py
new file mode 100644
index 0000000..4a96345
--- /dev/null
+++ b/debian/tests/api-2.py
@@ -0,0 +1,14 @@
+#!/usr/bin/python
+
+import distro
+
+
+# Not the full API, but enough to flex the package.
+print distro.linux_distribution()
+print distro.linux_distribution(full_distribution_name=False)
+print distro.name()
+print distro.name(pretty=True)
+
+# Use lsb_release for enhanced information.
+assert len(distro.LinuxDistribution().lsb_release_info()) > 0, (
+    "Why isn't lsb_release(1) available?")
diff --git a/debian/tests/api-3.py b/debian/tests/api-3.py
new file mode 100644
index 0000000..6fae352
--- /dev/null
+++ b/debian/tests/api-3.py
@@ -0,0 +1,14 @@
+#!/usr/bin/python3
+
+import distro
+
+
+# Not the full API, but enough to flex the package.
+print(distro.linux_distribution())
+print(distro.linux_distribution(full_distribution_name=False))
+print(distro.name())
+print(distro.name(pretty=True))
+
+# Use lsb_release for enhanced information.
+assert len(distro.LinuxDistribution().lsb_release_info()) > 0, (
+    "Why isn't lsb_release(1) available?")
diff --git a/debian/tests/control b/debian/tests/control
new file mode 100644
index 0000000..ee05442
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1,11 @@
+Test-Command: cd "$ADTTMP" ; python -c "import distro; print distro"
+Depends: python-distro
+
+Test-Command: cd "$ADTTMP" ; python3 -c "import distro; print(distro)"
+Depends: python3-distro
+
+Tests: api-2.py
+Depends: python-distro
+
+Tests: api-3.py
+Depends: python3-distro

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-distro.git



More information about the Python-modules-commits mailing list