From 90d25c07dd9285dfb875454a3478a7504ef36222 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Wed, 3 Jul 2024 16:07:32 -0700 Subject: [PATCH 1/7] Raise the minimum python version to 3.7.3-1. This change is the start of: * Dropping support for Python 2 * Dropping support for Debian older than Buster (oldoldstable) * Dropping support for Ubuntu older than Focal (20.04) Further changes will update the minimum debhelper version and Debian Standards version. It's the debhelper bump which motivated dropping support for Ubuntu Bionic. --- stdeb/util.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/stdeb/util.py b/stdeb/util.py index 26b656e..33a1f91 100644 --- a/stdeb/util.py +++ b/stdeb/util.py @@ -29,7 +29,8 @@ DH_MIN_VERS = '9' # Fundamental to stdeb >= 0.10 DH_DEFAULT_VERS = 9 -PYTHON_ALL_MIN_VERS = '2.6.6-3' +# Choose the oldest from Debian oldoldstable and currently supported Ubuntu LTS +PYTHON3_ALL_MIN_VERS = '3.7.3-1' try: # Python 2.x @@ -862,6 +863,10 @@ def __init__(self, self.uploaders = parse_vals(cfg, module_name, 'Uploaders') self.date822 = get_date_822() + if with_python2: + log.error("Python 2 is no longer supported. Use stdeb <= 0.10.0 for Python 2") + sys.exit(1) + build_deps = [] if use_setuptools: if with_python2: From 0ede5016deebe41681011e7db4ce66283796d385 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Wed, 3 Jul 2024 16:27:18 -0700 Subject: [PATCH 2/7] Try to continue supporting python2 generation on platforms that have python-all. --- stdeb/util.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/stdeb/util.py b/stdeb/util.py index 33a1f91..2b42895 100644 --- a/stdeb/util.py +++ b/stdeb/util.py @@ -30,6 +30,7 @@ DH_DEFAULT_VERS = 9 # Choose the oldest from Debian oldoldstable and currently supported Ubuntu LTS +PYTHON_ALL_MIN_VERS = '2.7.16-1' PYTHON3_ALL_MIN_VERS = '3.7.3-1' try: @@ -863,10 +864,6 @@ def __init__(self, self.uploaders = parse_vals(cfg, module_name, 'Uploaders') self.date822 = get_date_822() - if with_python2: - log.error("Python 2 is no longer supported. Use stdeb <= 0.10.0 for Python 2") - sys.exit(1) - build_deps = [] if use_setuptools: if with_python2: From 13c6e2d2f481ec99899b0a11c0451f9ab064edc7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Wed, 3 Jul 2024 16:27:58 -0700 Subject: [PATCH 3/7] Prospective changelog for v0.11.0. --- README.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.rst b/README.rst index 5b8b568..d3fd1d1 100644 --- a/README.rst +++ b/README.rst @@ -52,6 +52,13 @@ interpreter (and only the Python3 package installs scripts):: News ---- + * 2024-07-03: **Version 0.11.0**. See the `download page + `__. + + * Breaking changes: + + * remove support for running stdeb using Python 2. + * 2024-11-14: **Version 0.10.1**. See the `download page `__. This is the last planned release of stdeb which supports running stdeb From 7257d9923f06e5bc8e47f0eb62bb9e8d8c287e90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Wed, 3 Jul 2024 16:48:03 -0700 Subject: [PATCH 4/7] Update minimum debhelper version. python_distutils is no longer supported as a buildsystem and pybuild is required instead. --- stdeb/util.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/stdeb/util.py b/stdeb/util.py index 2b42895..4242c6c 100644 --- a/stdeb/util.py +++ b/stdeb/util.py @@ -26,8 +26,8 @@ 'apply_patch', 'repack_tarball_with_debianized_dirname', 'expand_sdist_file', 'stdeb_cfg_options'] -DH_MIN_VERS = '9' # Fundamental to stdeb >= 0.10 -DH_DEFAULT_VERS = 9 +DH_MIN_VERS = '12' # Fundamental to stdeb >= 0.10 +DH_DEFAULT_VERS = 12 # Choose the oldest from Debian oldoldstable and currently supported Ubuntu LTS PYTHON_ALL_MIN_VERS = '2.7.16-1' @@ -1233,7 +1233,7 @@ def __init__(self, sequencer_options.append('--with python-virtualenv') else: - sequencer_options.append('--buildsystem=python_distutils') + sequencer_options.append('--buildsystem=pybuild') self.override_dh_virtualenv_py = '' if with_dh_systemd: @@ -1562,6 +1562,14 @@ def build_dsc(debinfo, if len(python3_defaults_version_str) == 0: log.warn('This version of stdeb requires python3-all, ' 'but you do not have this package installed.') + else: + if not dpkg_compare_versions( + python3_defaults_version_str, 'ge', PYTHON3_ALL_MIN_VERS + ): + log.warn('This version of stdeb requires python-all >= ' + '%s. Use stdeb 0.6.0 or older to generate source ' + 'packages that use python-support.' % ( + PYTHON_ALL_MIN_VERS,)) # D. restore debianized tree os.rename(fullpath_repackaged_dirname+'.debianized', From 8cac7c6f27f1af177f9c2c763873088586cce8fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Wed, 3 Jul 2024 16:48:54 -0700 Subject: [PATCH 5/7] Update Standard Version. I read through the changelogs here and as far as I can tell we're as compliant with the changes as we were with the previous standards. Please open issues for Standards violations. They won't always be addressed but we can note them in the README. --- stdeb/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdeb/util.py b/stdeb/util.py index 4242c6c..61b1343 100644 --- a/stdeb/util.py +++ b/stdeb/util.py @@ -1615,7 +1615,7 @@ def build_dsc(debinfo, %(uploaders)sSection: %(debian_section)s Priority: optional Build-Depends: %(build_depends)s -Standards-Version: 3.9.1 +Standards-Version: 4.7.0 %(source_stanza_extras)s %(control_py2_stanza)s From fb4593dcd8b2dbaf6bc487770c74477b55d147a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Wed, 3 Jul 2024 16:51:44 -0700 Subject: [PATCH 6/7] setuptools --install-layout argument is no longer supported... And seemingly no longer necessary. --- stdeb/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdeb/util.py b/stdeb/util.py index 61b1343..5d073ac 100644 --- a/stdeb/util.py +++ b/stdeb/util.py @@ -1680,7 +1680,7 @@ def build_dsc(debinfo, RULES_OVERRIDE_INSTALL_TARGET_PY2 = " %(python2_binname)s setup.py install --force --root=debian/%(package)s --no-compile -O0 --install-layout=deb %(install_prefix)s %(no_python2_scripts_cli_args)s" # noqa: E501 -RULES_OVERRIDE_INSTALL_TARGET_PY3 = " python3 setup.py install --force --root=debian/%(package3)s --no-compile -O0 --install-layout=deb %(install_prefix)s %(no_python3_scripts_cli_args)s" # noqa: E501 +RULES_OVERRIDE_INSTALL_TARGET_PY3 = " python3 setup.py install --force --root=debian/%(package3)s --no-compile -O0 %(install_prefix)s %(no_python3_scripts_cli_args)s" # noqa: E501 RULES_OVERRIDE_INSTALL_TARGET = """ override_dh_auto_install: From e4c844b168b8e02f04010eccbcb9858065acab03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steven!=20Ragnar=C3=B6k?= Date: Thu, 14 Nov 2024 14:22:25 -0800 Subject: [PATCH 7/7] Revert "setuptools --install-layout argument is no longer supported..." This is creating trouble during tests. Scripts are being installed to usr/local/bin instead of usr/bin and aside from the fact that this is tripping up the dh_usrlocal helper it is incorrect. This reverts commit f8c8b159805181b4423593280a7bc28f89c77ca8. --- stdeb/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stdeb/util.py b/stdeb/util.py index 5d073ac..61b1343 100644 --- a/stdeb/util.py +++ b/stdeb/util.py @@ -1680,7 +1680,7 @@ def build_dsc(debinfo, RULES_OVERRIDE_INSTALL_TARGET_PY2 = " %(python2_binname)s setup.py install --force --root=debian/%(package)s --no-compile -O0 --install-layout=deb %(install_prefix)s %(no_python2_scripts_cli_args)s" # noqa: E501 -RULES_OVERRIDE_INSTALL_TARGET_PY3 = " python3 setup.py install --force --root=debian/%(package3)s --no-compile -O0 %(install_prefix)s %(no_python3_scripts_cli_args)s" # noqa: E501 +RULES_OVERRIDE_INSTALL_TARGET_PY3 = " python3 setup.py install --force --root=debian/%(package3)s --no-compile -O0 --install-layout=deb %(install_prefix)s %(no_python3_scripts_cli_args)s" # noqa: E501 RULES_OVERRIDE_INSTALL_TARGET = """ override_dh_auto_install: