Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raise the minimum python version to 3.7.3-1. #198

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
7 changes: 7 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ interpreter (and only the Python3 package installs scripts)::
News
----

* 2024-07-03: **Version 0.11.0**. See the `download page
<https://pypi.python.org/pypi/stdeb/0.11.0>`__.

* Breaking changes:

* remove support for running stdeb using Python 2.

* 2024-11-14: **Version 0.10.1**. See the `download page
<https://pypi.python.org/pypi/stdeb/0.10.1>`__.
This is the last planned release of stdeb which supports running stdeb
Expand Down
20 changes: 15 additions & 5 deletions stdeb/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,12 @@
'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

PYTHON_ALL_MIN_VERS = '2.6.6-3'
# 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:
# Python 2.x
Expand Down Expand Up @@ -1231,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:
Expand Down Expand Up @@ -1560,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',
Expand Down Expand Up @@ -1605,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
Expand Down