tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Fixing lang/python311 by splitting off NIS module (Re: using pkg-config modules from host (Re: wip/py-numpy + blas))



TL;DR: remove nis.so from lang/python31[12], import wip/libnsl and wip/py-nis?

Am Thu, 7 Dec 2023 19:48:51 +0100
schrieb Niclas Rosenvik <nros%netbsd.org@localhost>:

> I have been working on that today, see libnsl and py-nis in wip.

Cool. Now … can we resolve this? Otherwise, lang/python311 won't install
on modern Linux systems that have development headers and pkg-config
files for libnsl and libtirpc (with PKG_DEVELOPER, at least). I'd like
to avoid such basic breakage for the branch.

I tried wip/py-nis and it installed fine, giving me this:

$ python3.11
Python 3.11.6 (main, Dec 16 2023, 08:43:50) [GCC 11.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import nis
<stdin>:1: DeprecationWarning: 'nis' is deprecated and slated for removal in Python 3.13
>>> quit()

The message is a bit funny, It is not present when doing this with
python312. I added this to remove the NIS module from python311:

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/lang/python311/Makefile,v
retrieving revision 1.22
diff -u -r1.22 Makefile
--- Makefile	11 Dec 2023 10:23:42 -0000	1.22
+++ Makefile	27 Dec 2023 12:48:21 -0000
@@ -3,6 +3,7 @@
 .include "dist.mk"
 
 PKGNAME=	python311-${PY_DISTVERSION}
+PKGREVISION=	1
 CATEGORIES=	lang python
 
 MAINTAINER=	pkgsrc-users%NetBSD.org@localhost
@@ -106,21 +107,10 @@
 
 LDFLAGS.SunOS+=	-lresolv
 
-PLIST_VARS+=	dbm nis
+PLIST_VARS+=	dbm
 .if ${OPSYS} != "Linux"
 PLIST.dbm=	yes
 .endif
-.for incdir in ${_OPSYS_INCLUDE_DIRS}
-.  if (exists(${incdir}/rpc/rpc.h) || exists(${incdir}/tirpc/rpc/rpc.h))
-HAVE_RPC_H=	yes
-.  endif
-.  if (exists(${incdir}/rpcsvc/yp_prot.h) || exists(${incdir}/nsl/rpcsvc/yp_prot.h))
-HAVE_YP_PROT_H=	yes
-.  endif
-.endfor
-.if (${HAVE_RPC_H:Uno} == yes && ${HAVE_YP_PROT_H:Uno} == yes)
-PLIST.nis=	yes
-.endif
 
 PLIST_SUBST+=	PY_VER_SUFFIX=${PY_VER_SUFFIX:Q}
 
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/lang/python311/PLIST,v
retrieving revision 1.9
diff -u -r1.9 PLIST
--- PLIST	11 Dec 2023 10:23:42 -0000	1.9
+++ PLIST	27 Dec 2023 12:48:22 -0000
@@ -2107,7 +2107,6 @@
 lib/python${PY_VER_SUFFIX}/lib-dynload/grp.so
 lib/python${PY_VER_SUFFIX}/lib-dynload/math.so
 lib/python${PY_VER_SUFFIX}/lib-dynload/mmap.so
-${PLIST.nis}lib/python${PY_VER_SUFFIX}/lib-dynload/nis.so
 lib/python${PY_VER_SUFFIX}/lib-dynload/pyexpat.so
 lib/python${PY_VER_SUFFIX}/lib-dynload/readline.so
 lib/python${PY_VER_SUFFIX}/lib-dynload/resource.so
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/lang/python311/distinfo,v
retrieving revision 1.12
diff -u -r1.12 distinfo
--- distinfo	11 Dec 2023 10:23:42 -0000	1.12
+++ distinfo	27 Dec 2023 12:48:22 -0000
@@ -9,5 +9,5 @@
 SHA1 (patch-Lib_lib2to3_pgen2_driver.py) = 593c4e93c5653ab400f0a98b91db92630c0a7390
 SHA1 (patch-Lib_sysconfig.py) = bc6d91bf8f7121456b26ea7f080f588c96f2596f
 SHA1 (patch-Makefile.pre.in) = fdb5794d112f422a1f28aa9f8b179dc05520f9e1
-SHA1 (patch-configure) = a6d9a00ff160581245bc30d1b0d2ec0e9da8fb0b
+SHA1 (patch-configure) = 6e598b02d5dda72e4a2c518a8ccdba64eff761f0
 SHA1 (patch-setup.py) = a601ce207f5e61d15503c8781e925353d1e516b9
Index: patches/patch-configure
===================================================================
RCS file: /cvsroot/pkgsrc/lang/python311/patches/patch-configure,v
retrieving revision 1.5
diff -u -r1.5 patch-configure
--- patches/patch-configure	25 Aug 2023 08:28:22 -0000	1.5
+++ patches/patch-configure	27 Dec 2023 12:48:22 -0000
@@ -5,7 +5,7 @@
 Simplify _sysconfigdata to include only platform name.
 Disable barrier to cross-compilation.
 
---- configure.orig	2023-08-24 12:09:18.000000000 +0000
+--- configure.orig	2023-12-04 17:56:29.000000000 +0000
 +++ configure
 @@ -3262,7 +3262,7 @@ fi
      fi
@@ -16,7 +16,7 @@
      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_build_python" >&5
  $as_echo "$with_build_python" >&6; }
  
-@@ -3865,7 +3865,7 @@ fi
+@@ -3876,7 +3876,7 @@ fi
  $as_echo "\"$MACHDEP\"" >&6; }
  
  
@@ -25,7 +25,7 @@
  	case "$host" in
  	*-*-linux*)
  		case "$host_cpu" in
-@@ -8259,7 +8259,7 @@ UNIVERSAL_ARCH_FLAGS=
+@@ -8270,7 +8270,7 @@ UNIVERSAL_ARCH_FLAGS=
  # tweak BASECFLAGS based on compiler and platform
  case $GCC in
  yes)
@@ -34,7 +34,17 @@
  
  
  
-@@ -19916,10 +19916,10 @@ _ACEOF
+@@ -12473,7 +12473,8 @@ if test "$ac_res" != no; then :
+ else
+   have_nis=no
+ fi
+-
++# Disable NIS for separately packaged module.
++have_nis=no
+ 
+ CFLAGS=$save_CFLAGS
+ CPPFLAGS=$save_CPPFLAGS
+@@ -19927,10 +19928,10 @@ _ACEOF
  if ac_fn_c_try_compile "$LINENO"; then :
  
  
@@ -47,7 +57,7 @@
    if test "$ax_cv_c_float_words_bigendian" = unknown; then
      ax_cv_c_float_words_bigendian=no
    else
-@@ -20767,7 +20767,7 @@ _ACEOF
+@@ -20778,7 +20779,7 @@ _ACEOF
  fi
  
  
@@ -56,7 +66,7 @@
  
  { $as_echo "$as_me:${as_lineno-$LINENO}: checking LDVERSION" >&5
  $as_echo_n "checking LDVERSION... " >&6; }
-@@ -20820,11 +20820,7 @@ fi
+@@ -20831,11 +20832,7 @@ fi
  
  

(The patch for python312 looks very similar.)
  

I presume we need to set PYTHON_VERSIONS_INCOMPATIBLE to everthing
below 3.11 on wip/py-nis (it doesn't build with 3.10 nor 3.9 in my
tests, and it's not necessary there).


Shall we proceed and import wip/libnsl and wip/py-nis and drop
PLIST.nis for lang/python311 and lang/python312? Upcoming
lang/pythohn313 should need no patching since they intend to drop
nis.so then.


Alrighty then,

Thomas

-- 
Dr. Thomas Orgis
HPC @ Universität Hamburg


Home | Main Index | Thread Index | Old Index