Opened 3 years ago

Closed 15 months ago

#63955 closed enhancement (fixed)

ntpsec @1.2.1_1: support Python 3

Reported by: l2dy (Zero King) Owned by: fhgwright (Fred Wright)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc:
Port: ntpsec

Description

Python 2 has been discontinued, we should use Python 3 which is supported.

https://gitlab.com/NTPsec/ntpsec/-/blob/NTPsec_1_2_1/INSTALL.adoc

Python 2.x, x >= 6, or Python 3.x, x >= 3

Change History (6)

comment:1 Changed 3 years ago by fhgwright (Fred Wright)

The ntpsec port provides Python modules which can be used by users. Changing the Python version may break users' existing code, and adapting their existing Python 2 code to Python 3 may require serious work, due to the significant incompatibilities between Python 2 and Python 3.

The proper fix for this would be to have variants for Python versions (or, better still, multiple subports), but that's significant work. Complicating this is that the upstream method for targeting a different Python version from the one used to run waf doesn't seem to work correctly in the MacPorts environment (for as yet undetermined reasons), and the current waf PortGroup doesn't provide a properly functioning method to specify its Python version (though waf itself is compatible with a wide range of Python versions).

comment:2 Changed 3 years ago by l2dy (Zero King)

On the other hand, this will prevent users willing to upgrade from doing so.

Let's leave this ticket open until Python variants or subports get implemented.

comment:3 Changed 3 years ago by fhgwright (Fred Wright)

Agreed, but it should probably be titled "ntpsec: support Python 3".

I don't have permissions to change the summary, even as the ticket owner. Thank you, Trac. :-)

comment:4 Changed 3 years ago by l2dy (Zero King)

Summary: ntpsec @1.2.1_1: use Python 3ntpsec @1.2.1_1: support Python 3

comment:5 Changed 17 months ago by fhgwright (Fred Wright)

I have this implemented, but ran into a small hitch and won't have time to do any more on it until next month.

comment:6 Changed 15 months ago by fhgwright (Fred Wright)

Resolution: fixed
Status: assignedclosed

In 3ae13a419c4aee5de2ea6fd8b206381849ee8707/macports-ports (master):

ntpsec: Add variants for Python versions.

This implements pythonXY variants to allow choosing the Python
version. The default remains +python27 for now, as noted.

Having subports for each Python version would be better, but is more
work, so for now only one version at a time can be selected.

Closes: #63955

Also removes the erroneously installed 'runtests' program.

Also removes the unnecessary dependency on py-test.

This gets a revbump due to the 'runtests' removal, as well as due to
the registry update for the new variants.

TESTED:
Built and ran tests with all variants on 10.4-10.5 ppc, 10.4-10.6
i386, 10.6-10.15 x86_64, and 11.x-13.x arm64. Successful except where
pythonXY was unavailable or broken on the OS/CPU combination.

Note: See TracTickets for help on using tickets.