tech-pkg archive

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

Re: bin/pip3.12 or bin/pip-3.12



Am Tue, 6 May 2025 16:44:24 +0200
schrieb Thomas Klausner <wiz%gatalith.at@localhost>:

> That was actually changed in June 2024, so probably 2024Q2.

Yeah, I missed some releases during various causes for busy-ness.

> I don't really care one way or the other, but if you do so, don't
> forget to update the name in the ALTERNATIVES file.

Good to remember. Though, is someone here (Adam?) who can say if this
change was intentional or by accident?

> 
> In general, I recommend installing pkg_alternatives, then you'll have
> an unversioned 'pip' (and 'pip3') executable.

What may be fine for the general case, but I precisely install multiple
pythons in one prefix so that different users can decide to use
differing pythons, supported by environment modules. So in effect I got
separate prefixes that contain symlinks like

/link/python3.12/bin/python → /pkg/2025Q1/bin/python3.12

(very simplified)

I do link one version of python as the default v3 one in the pkg
prefix. But that is once and doesn't change per user. I might start
using alternatives for this one-time switch, but right now I like the
situation that users need to decide to load an environment module like

	module load pythonversion/3.12

to get a plain 'python' command that maps to any verison at all. This
is all custom hackery for python, though. I don't fancy doing this for
more other software. I fix a link for ffmpeg to ffmpeg5, for example. I
do not think that it is that important to users which ffmpeg they get,
or at least only to few users who then can call ffmpeg4.


So my proposed patch is the following, then …

Alrighty then,

Thomas

diff -ruN pkgsrc-2025Q1/devel/py-pip/ALTERNATIVES pkgsrc/devel/py-pip/ALTERNATIVES
--- pkgsrc-2025Q1/devel/py-pip/ALTERNATIVES     2025-04-02 05:01:42.000000000 +0200
+++ pkgsrc/devel/py-pip/ALTERNATIVES    2025-05-06 17:03:00.465342598 +0200
@@ -1,2 +1,2 @@
-bin/pip @PREFIX@/bin/pip-@PYVERSSUFFIX@
-bin/pip@PYMAJORVERSION@ @PREFIX@/bin/pip-@PYVERSSUFFIX@
+bin/pip @PREFIX@/bin/pip@PYVERSSUFFIX@
+bin/pip@PYMAJORVERSION@ @PREFIX@/bin/pip@PYVERSSUFFIX@
diff -ruN pkgsrc-2025Q1/devel/py-pip/Makefile pkgsrc/devel/py-pip/Makefile
--- pkgsrc-2025Q1/devel/py-pip/Makefile 2025-04-02 05:01:42.000000000 +0200
+++ pkgsrc/devel/py-pip/Makefile        2025-05-06 16:17:03.296408982 +0200
@@ -1,6 +1,7 @@
 # $NetBSD: Makefile,v 1.81 2025/02/10 10:50:58 adam Exp $
 
 DISTNAME=      pip-25.0.1
+PKGREVISION=   1
 PKGNAME=       ${PYPKGPREFIX}-${DISTNAME}
 CATEGORIES=    devel python
 MASTER_SITES=  ${MASTER_SITE_PYPI:=p/pip/}
@@ -22,7 +23,7 @@
 FILES_SUBST+=  PYMAJORVERSION=${PYTHON_VERSION:C/^([0-9]).*/\1/}
 
 post-install:
-       cd ${DESTDIR}${PREFIX}/bin && ${RM} -f pip3 && ${MV} pip pip-${PYVERSSUFFIX} || ${TRUE}
+       cd ${DESTDIR}${PREFIX}/bin && ${RM} -f pip3 && ${MV} pip pip${PYVERSSUFFIX} || ${TRUE}
 
 .include "../../lang/python/application.mk"
 .include "../../lang/python/wheel.mk"
diff -ruN pkgsrc-2025Q1/devel/py-pip/PLIST pkgsrc/devel/py-pip/PLIST
--- pkgsrc-2025Q1/devel/py-pip/PLIST    2025-04-02 05:01:42.000000000 +0200
+++ pkgsrc/devel/py-pip/PLIST   2025-05-06 16:17:12.704298131 +0200
@@ -1,5 +1,5 @@
 @comment $NetBSD: PLIST,v 1.45 2025/02/02 16:10:42 wiz Exp $
-bin/pip-${PYVERSSUFFIX}
+bin/pip${PYVERSSUFFIX}
 ${PYSITELIB}/${WHEEL_INFODIR}/AUTHORS.txt
 ${PYSITELIB}/${WHEEL_INFODIR}/LICENSE.txt
 ${PYSITELIB}/${WHEEL_INFODIR}/METADATA


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


Home | Main Index | Thread Index | Old Index