summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Finney <bignose@debian.org>2023-07-21 16:48:54 +1000
committergit-ubuntu importer <ubuntu-devel-discuss@lists.ubuntu.com>2023-07-21 10:36:59 +0000
commitb254aa18cd10b8839a7fe7d072f14d2dc1354d57 (patch)
treeb2b7aa5144507fd38548bead4ba354875a173a70
parent4897d8875246100b0b2199bb5548886c18cdc10f (diff)
Imported using git-ubuntu import.
Notes
Notes: * The “Sarah Gorelick” release. * Declare conformance to “Standards-Version: 4.6.2”. No additional changes required. * Ensure AutoPkgTest import test executes outside of source tree. * Use external package ‘python3-package-smoke-test’ for AutoPkgTest. Closes: bug#1040852. Thanks to Matthias Klose for the report. * debian/tests/smoke_test.py: * Remove unused test helper module, now migrated to external package.
-rw-r--r--debian/.editorconfig16
-rw-r--r--debian/changelog13
-rw-r--r--debian/control2
-rw-r--r--debian/copyright2
-rwxr-xr-xdebian/rules2
-rw-r--r--debian/tests/control4
-rwxr-xr-xdebian/tests/smoke-python314
-rw-r--r--debian/tests/smoke_test.py148
-rw-r--r--debian/upstream/metadata2
9 files changed, 38 insertions, 165 deletions
diff --git a/debian/.editorconfig b/debian/.editorconfig
index 29b7cd0..27d7a11 100644
--- a/debian/.editorconfig
+++ b/debian/.editorconfig
@@ -1,23 +1,24 @@
# debian/.editorconfig
-# EditorConfig configuration for Debian packaging files.
-# Homepage: <URL:http://editorconfig.org/>
+# EditorConfig settings for Debian packaging files.
+# Documentation: <URL:https://editorconfig.org/>.
# Is this the project-root configuration file?
root = false
+# Match all file names, unless more specific match later.
[*]
-# Character encoding to use.
+# Text encoding name.
charset = utf-8
-# Indentation style (“tab”, “space”).
+# Character to use for indentation (“tab” for U+0009, “space” for U+0020).
indent_style = space
# How many columns (integer) for each indentation level.
indent_size = 4
-# How many columns (integer) to represent a U+0008 TAB.
+# How many columns (integer) to represent a U+0009 TAB.
tab_width = 8
# How many characters (integer) before enforcing line wrap.
@@ -26,7 +27,7 @@ max_line_length = 79
# Remove trailing whitespace on each line?
trim_trailing_whitespace = true
-# Line break style (“lf”, “cr”, “crlf”).
+# End-of-line style (“lf”, “cr”, “crlf”).
end_of_line = lf
# Ensure file ends with a line break?
@@ -43,6 +44,7 @@ trim_trailing_whitespace = false
# Local variables:
# coding: utf-8
+# mode: conf-editorconfig
# mode: conf
# End:
-# vim: fileencoding=utf-8 filetype=conf :
+# vim: fileencoding=utf-8 filetype=dosini :
diff --git a/debian/changelog b/debian/changelog
index 1b4d9b4..45cd39e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,16 @@
+python-jsonext (0.4.2-3) unstable; urgency=medium
+
+ * The “Sarah Gorelick” release.
+ * Declare conformance to “Standards-Version: 4.6.2”.
+ No additional changes required.
+ * Ensure AutoPkgTest import test executes outside of source tree.
+ * Use external package ‘python3-package-smoke-test’ for AutoPkgTest.
+ Closes: bug#1040852. Thanks to Matthias Klose for the report.
+ * debian/tests/smoke_test.py:
+ * Remove unused test helper module, now migrated to external package.
+
+ -- Ben Finney <bignose@debian.org> Fri, 21 Jul 2023 16:48:54 +1000
+
python-jsonext (0.4.2-2) unstable; urgency=medium
* Acknowledge non-maintainer upload “0.4.2-1.1”.
diff --git a/debian/control b/debian/control
index dca71fc..ceb5312 100644
--- a/debian/control
+++ b/debian/control
@@ -10,7 +10,7 @@ Build-Depends:
python3-all,
dh-python,
debhelper-compat (= 13)
-Standards-Version: 4.6.1
+Standards-Version: 4.6.2
Homepage: https://github.com/mbr/jsonext
VCS-Git: https://salsa.debian.org/bignose/pkg-python-jsonext.git
VCS-Browser: https://salsa.debian.org/bignose/pkg-python-jsonext/
diff --git a/debian/copyright b/debian/copyright
index 4d2d181..381f9da 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -10,7 +10,7 @@ License: Expat
Files: debian/*
Copyright:
- © 2009–2022 Ben Finney <bignose@debian.org>
+ © 2009–2023 Ben Finney <bignose@debian.org>
License: GPL-3+
License-Grant:
This is free software: you may copy, modify, and/or distribute this work
diff --git a/debian/rules b/debian/rules
index cf1dceb..f8e6672 100755
--- a/debian/rules
+++ b/debian/rules
@@ -23,7 +23,7 @@ override_dh_auto_clean:
$(RM) -r ${GENERATED_FILES}
-# Copyright © 2009–2022 Ben Finney <bignose@debian.org>
+# Copyright © 2009–2023 Ben Finney <bignose@debian.org>
#
# This is free software: you may copy, modify, and/or distribute this work
# under the terms of the GNU General Public License as published by the
diff --git a/debian/tests/control b/debian/tests/control
index b82ff66..1c74b44 100644
--- a/debian/tests/control
+++ b/debian/tests/control
@@ -10,12 +10,12 @@ Tests: smoke-python3
Restrictions:
superficial
Depends:
- python3-pkg-resources,
+ python3-package-smoke-test,
python3-all,
@
-# Copyright © 2016–2022 Ben Finney <bignose@debian.org>
+# Copyright © 2016–2023 Ben Finney <bignose@debian.org>
# This is free software: you may copy, modify, and/or distribute this work
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; version 3 of that license or any later version.
diff --git a/debian/tests/smoke-python3 b/debian/tests/smoke-python3
index ac5b3a2..5c6acd5 100755
--- a/debian/tests/smoke-python3
+++ b/debian/tests/smoke-python3
@@ -6,7 +6,7 @@
# This is free software, and you are welcome to redistribute it under
# certain conditions; see the end of this file for copyright
# information, grant of license, and disclaimer of warranty.
-#
+
# Smoke test for package in Python 3 environments.
set -o errexit
@@ -18,6 +18,13 @@ MODULE_NAMES=(
jsonext
)
+program_dir="$(dirname "$(realpath --strip "$0")")"
+
+# Use a working directory away from the source package root,
+# so that Python imports will not find the local source package.
+working_dir="$program_dir"
+cd "$working_dir"
+
test_opts="--distribution=$DISTRIBUTION_NAME"
for mod in ${MODULE_NAMES[@]} ; do
# Accumulate the module names.
@@ -26,13 +33,12 @@ done
for py in $(py3versions --supported) ; do
printf "Python command: %s\n" $py
- $py debian/tests/smoke_test.py $test_opts
+ $py -m package_smoke_test $test_opts
printf "\n"
done
-# Copyright © 2016–2022 Ben Finney <bignose@debian.org>
-#
+# Copyright © 2016–2023 Ben Finney <bignose@debian.org>
# This is free software: you may copy, modify, and/or distribute this work
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; version 3 of that license or any later version.
diff --git a/debian/tests/smoke_test.py b/debian/tests/smoke_test.py
deleted file mode 100644
index 5c928da..0000000
--- a/debian/tests/smoke_test.py
+++ /dev/null
@@ -1,148 +0,0 @@
-# debian/tests/smoke_test.py
-#
-# This is free software, and you are welcome to redistribute it under
-# certain conditions; see the end of this file for copyright
-# information, grant of license, and disclaimer of warranty.
-
-""" Post-install Python smoke test for use in Debian autopkgtest.
-
- Written to test all installed versions of a package.
-
- Smoke test the distribution::
- --distribution=DISTRIBUTION
-
- Smoke test one or more modules::
- --module=MODULE_FOO --module=MODULE_BAR --module=MODULE_BAZ
- """
-
-import argparse
-import importlib
-import importlib.metadata
-import sys
-import textwrap
-
-import pkg_resources
-
-
-def emit_implementation():
- """ Emit the details of the current Python implementation.
-
- :return: ``None``.
- """
- sys.stdout.write(textwrap.dedent("""\
- Interpreter: {command}
- \t{version}
- """).format(command=sys.executable, version=sys.version))
-
-
-def emit_distribution_metadata(name):
- """ Get the distribution `name` and emit some metadata.
-
- :param name: Name of the distribution to retrieve.
- :return: ``None``.
- """
- metadata = importlib.metadata.metadata(name)
- sys.stdout.write(textwrap.dedent("""\
- Distribution ‘{name}’:
- \t{metadata[Name]} {metadata[Version]}
- """).format(name=name, metadata=metadata))
-
-
-def emit_module(name):
- """ Import the module `name` and emit the module representation.
-
- :param name: Full name of the module to import.
- :return: ``None``.
- """
- module = importlib.import_module(name)
- sys.stdout.write(textwrap.dedent("""\
- Package ‘{name}’:
- \t{module!r}
- """).format(name=name, module=module))
-
-
-def suite(args):
- """ Run the full suite of tests.
-
- :param args: Namespace of arguments parsed from `ArgumentParser`.
- :return: ``None``.
- """
- emit_implementation()
-
- if args.distribution_name:
- emit_distribution_metadata(args.distribution_name)
-
- if args.module_names:
- for module_name in args.module_names:
- emit_module(module_name)
-
-
-class SmokeTestArgumentParser(argparse.ArgumentParser):
- """ Command-line argument parser for this program. """
-
- def __init__(self, *args, **kwargs):
- super(SmokeTestArgumentParser, self).__init__(*args, **kwargs)
-
- self.add_argument(
- '--distribution',
- dest='distribution_name', type=str,
- metavar="DISTRIBUTION", help=(
- "Test the Python distribution named DISTRIBUTION."))
- self.add_argument(
- '--module',
- dest='module_names', type=str, nargs='+',
- metavar="MODULE", help=(
- "Test the Python module named MODULE."))
-
- def parse_args(self, *args, **kwargs):
- args = super().parse_args(*args, **kwargs)
-
- if (not any([args.distribution_name, args.module_names])):
- self.error("one of DISTRIBUTION or MODULE is required")
-
- return args
-
-
-def main(argv=None):
- """ Mainline code for this module.
-
- :param argv: Sequence of all command line arguments.
- (Default: `sys.argv`)
- :return: The exit status (integer) for exit from the process.
- """
- exit_status = 0
-
- if argv is None:
- argv = sys.argv
-
- try:
- program_name = argv[0]
- parser = SmokeTestArgumentParser(prog=program_name)
- args = parser.parse_args(argv[1:])
-
- suite(args)
-
- except SystemExit as exc:
- exit_status = exc.code
-
- return exit_status
-
-
-if __name__ == "__main__":
- exit_status = main(sys.argv)
- sys.exit(exit_status)
-
-
-# Copyright © 2016–2022 Ben Finney <bignose@debian.org>
-#
-# This is free software: you may copy, modify, and/or distribute this work
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; version 3 of that license or any later version.
-# No warranty expressed or implied.
-
-
-# Local variables:
-# coding: utf-8
-# mode: python
-# End:
-# vim: fileencoding=utf-8 filetype=python :
diff --git a/debian/upstream/metadata b/debian/upstream/metadata
index 602284d..bc31da7 100644
--- a/debian/upstream/metadata
+++ b/debian/upstream/metadata
@@ -17,7 +17,7 @@ Repository: https://github.com/mbr/jsonext.git
Repository-Browse: https://github.com/mbr/jsonext/
-# Copyright © 2018–2022 Ben Finney <bignose@debian.org>
+# Copyright © 2018–2023 Ben Finney <bignose@debian.org>
#
# This is free software; you may copy, modify, and/or distribute this work
# under the terms of the GNU General Public License, version 3 or later.