Checking issues (for a release)
James Browning
jamesb192 at jamesb192.com
Mon Jan 27 15:01:43 UTC 2025
On Monday, January 27, 2025 3:10:55 AM Pacific Standard Time Hal Murray via
devel wrote:
> What's the story on new waf vs old python?
> https://gitlab.com/NTPsec/ntpsec/-/issues/830
Python versions before 2.6 break because they seem to lack an 'as' keyword.
Python 2.6 fails on my system because of missing dev files and the sysconfig
module missing. The missing dev files can be worked around with the following
patch.
```
--- a/pylib/wscript
+++ b/pylib/wscript
@@ -13,7 +13,8 @@ def configure(conf):
conf.load('python')
if not conf.env.ENABLE_CROSS:
conf.check_python_version((2, 6, 0))
- conf.check_python_headers(features='pyext') # Extension-only, no
embedded
+ if conf.env['ntpc'] == 'ext':
+ conf.check_python_headers(features='pyext') # Extension-only, no
embedded
try:
conf.check_python_module('curses')
conf.env['PYTHON_CURSES'] = True
```
The missing sysconfig can roughly patche around by adding the following file as
$LIBDIR/python2.6/sysconfig.py
```
from distutils.sysconfig import *
def get_path(*args, **kwargs):
if ('purelib', 'posix_user', {'userbase': '/usr/local'}) == args:
return '/usr/local/lib/python2.6/site-packages'
```
It should not work generally. It is however getting ntpsec to build on a
subset of hosts. These are not included in !1418 which need to be replaced.
> --enable-pylib none needs work
> https://gitlab.com/NTPsec/ntpsec/-/issues/819
> Should that be --disable-python?
Technically, they should be two different things. No pylib would preclude the
python module and the clients that depend on it. No Python would also exclude
ntpkeygen, ntploggps, and ntplogtemp IIRC. In !1386 I have no pylib option
also exclude those.
-30-
More information about the devel
mailing list