Opened 4 years ago

Closed 4 years ago

Last modified 4 years ago

#60887 closed enhancement (fixed)

certbot: Use python38 by default

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: Schamschula (Marius Schamschula)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: certbot

Description

The certbot port currently enables the python37 variant by default. Please change that to python38 because that is the latest stable version.

Also, the order of lines in the portfile looks incorrect. Starting at line 22, you check which python variant is selected and act upon it:

if {[variant_isset python27]} {
    python.default_version 27
} elseif {[variant_isset python36]} {
    python.default_version 36
} elseif {[variant_isset python38]} {
    python.default_version 38
} else {
    python.default_version 37
}

But later in the portfile on line 73 you possibly change which variant is selected, making the earlier determinations inaccurate:

if {![variant_isset python27] && ![variant_isset python36] && ![variant_isset python38]} {
    default_variants +python37
}

In fact this probably works fine, but looks brittle because it requires the developer to change 37 to 38 in two places; if the developer only changes one, the port probably misbehaves. It would be good to fix it so that the default python version need only be specified in one place.

Change History (2)

comment:1 Changed 4 years ago by Schamschula (Marius Schamschula)

Updated to make python 3.8 default: [5356ad3f1c8662f20287fa969bfc054505799cf3/macports-ports]

As far as the two blocks, I'll have to do some experimentation to merge them into one. I recall that there was a reason for this order, i.e. not declaring the variants before the depends_lib block. Variants are usually declared towards the bottom of the Portfile.

Last edited 4 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:2 Changed 4 years ago by Schamschula (Marius Schamschula)

Resolution: fixed
Status: assignedclosed

In 967e586876ab0973e81ef474c4b0931357640c29/macports-ports (master):

certbot: merge variant blocks

Closes: #60887

Note: See TracTickets for help on using tickets.