No fallout in a bulk... looking for OKs now :-)
On Thu, Nov 02, 2017 at 02:41:24PM +0000, Antoine Jacoutot wrote:
> On Thu, Nov 02, 2017 at 01:51:09PM +0000, Antoine Jacoutot wrote:
> > Hi.
> >
> > We have never provided a default 'python' utility with our packages and for
> > good reasons. That said, I would really like if we could provide a default
> > symlink to the default major versions of python. That is: python2 and
> > python3.
> > The rational behind this is that a lot of upstreams have "fixed" their
> > hardcoded
> > shebangs from #!/usr/bin/python... to #!/usr/bin/env python2 or
> > #!/usr/bin/env python3.
> > This would allow us to drop lots of patches, substitutions and
> > MODPY_ADJ_FILES
> > from our ports tree and make things easier for us in general.
> >
> > People willing to use another version as the default major are pretty much
> > on
> > their own but that's already the case today since we have substituting
> > everything anyway.
> >
> > I am putting this into a bulk right now...
> > What do you guys think?
>
> Better diff after rpointel's feedback.
> Uncomment a few more things to be consistent with what everyone else does.
> Going into a bulk soonish.
>
>
> Index: Makefile.inc
> ===================================================================
> RCS file: /cvs/ports/lang/python/Makefile.inc,v
> retrieving revision 1.123
> diff -u -p -r1.123 Makefile.inc
> --- Makefile.inc 16 Jul 2017 19:18:59 -0000 1.123
> +++ Makefile.inc 2 Nov 2017 14:40:13 -0000
> @@ -158,6 +158,8 @@ post-install:
> @sed -e "s,@VERSION@,${VERSION},g" -e "s,@LOCALBASE@,${LOCALBASE},g" \
> ${FILESDIR}/idle > ${WRKSRC}/idle
> ${INSTALL_SCRIPT} ${WRKSRC}/idle ${PREFIX}/bin/idle${VERSION}
> + cd ${PREFIX}/bin && ln -sf idle${VERSION} idle${VERSION:R}
> + mv ${PREFIX}/bin/pydoc ${PREFIX}/bin/pydoc2
> @cd ${WRKSRC}; tar -cf - Tools | (cd ${PREFIX}/lib/python${VERSION}; \
> tar -xf -)
> ${INSTALL_SCRIPT} ${WRKSRC}/Tools/scripts/2to3 \
> Index: 2.7/Makefile
> ===================================================================
> RCS file: /cvs/ports/lang/python/2.7/Makefile,v
> retrieving revision 1.53
> diff -u -p -r1.53 Makefile
> --- 2.7/Makefile 20 Sep 2017 18:44:48 -0000 1.53
> +++ 2.7/Makefile 2 Nov 2017 14:40:13 -0000
> @@ -9,6 +9,8 @@ VERSION = 2.7
> PATCHLEVEL = .14
> SHARED_LIBS = python2.7 0.0
> VERSION_SPEC = >=2.7,<2.8
> +REVISION-main = 0
> +REVISION-idle = 0
>
> CONFIGURE_ARGS += --with-ensurepip=no
>
> Index: 2.7/pkg/PLIST-idle
> ===================================================================
> RCS file: /cvs/ports/lang/python/2.7/pkg/PLIST-idle,v
> retrieving revision 1.8
> diff -u -p -r1.8 PLIST-idle
> --- 2.7/pkg/PLIST-idle 3 Jul 2016 18:16:00 -0000 1.8
> +++ 2.7/pkg/PLIST-idle 2 Nov 2017 14:40:13 -0000
> @@ -3,6 +3,7 @@
> @option is-branch
> @conflict python-idle->=2.7,<2.8
> @comment bin/idle
> +bin/idle2
> bin/idle2.7
> lib/python2.7/idlelib/
> lib/python2.7/idlelib/AutoComplete.py
> Index: 2.7/pkg/PLIST-main
> ===================================================================
> RCS file: /cvs/ports/lang/python/2.7/pkg/PLIST-main,v
> retrieving revision 1.20
> diff -u -p -r1.20 PLIST-main
> --- 2.7/pkg/PLIST-main 20 Sep 2017 18:44:48 -0000 1.20
> +++ 2.7/pkg/PLIST-main 2 Nov 2017 14:40:13 -0000
> @@ -7,13 +7,14 @@
> @pkgpath lang/python/2.7,-bz2
> @pkgpath lang/python/2.7,-sqlite
> @pkgpath lang/python/2.7,-expat
> -@comment bin/2to3
> @comment bin/pydoc
> +@comment bin/2to3
> +bin/pydoc2
> bin/pydoc2.7
> @comment bin/python
> @comment bin/python-config
> -@comment bin/python2
> -@comment bin/python2-config
> +bin/python2
> +bin/python2-config
> @bin bin/python2.7
> bin/python2.7-2to3
> bin/python2.7-config
> @@ -2497,7 +2498,7 @@ lib/python2.7/zipfile.py
> lib/python2.7/zipfile.pyc
> lib/python2.7/zipfile.pyo
> @comment man/man1/python.1
> -@comment man/man1/python2.1
> +@man man/man1/python2.1
> @man man/man1/python2.7.1
> share/doc/python2.7/
> share/doc/python2.7/CHANGES.OpenBSD
> Index: 3.6/Makefile
> ===================================================================
> RCS file: /cvs/ports/lang/python/3.6/Makefile,v
> retrieving revision 1.6
> diff -u -p -r1.6 Makefile
> --- 3.6/Makefile 15 Oct 2017 16:31:45 -0000 1.6
> +++ 3.6/Makefile 2 Nov 2017 14:40:13 -0000
> @@ -9,6 +9,8 @@ VERSION = 3.6
> PATCHLEVEL = .3
> SHARED_LIBS = python3.6m 0.0
> VERSION_SPEC = >=3.6,<3.7
> +REVISION-main = 0
> +REVISION-idle = 0
>
> CONFIGURE_ARGS += --with-ensurepip=no
>
> Index: 3.6/pkg/PLIST-idle
> ===================================================================
> RCS file: /cvs/ports/lang/python/3.6/pkg/PLIST-idle,v
> retrieving revision 1.2
> diff -u -p -r1.2 PLIST-idle
> --- 3.6/pkg/PLIST-idle 15 Oct 2017 16:31:45 -0000 1.2
> +++ 3.6/pkg/PLIST-idle 2 Nov 2017 14:40:13 -0000
> @@ -3,7 +3,7 @@
> @option is-branch
> @conflict python-idle->=3.6,<3.7
> @pkgpath lang/python3/3.6,-idle
> -@comment bin/idle3
> +bin/idle3
> bin/idle3.6
> lib/python3.6/idlelib/
> lib/python3.6/idlelib/CREDITS.txt
> Index: 3.6/pkg/PLIST-main
> ===================================================================
> RCS file: /cvs/ports/lang/python/3.6/pkg/PLIST-main,v
> retrieving revision 1.4
> diff -u -p -r1.4 PLIST-main
> --- 3.6/pkg/PLIST-main 15 Oct 2017 16:31:45 -0000 1.4
> +++ 3.6/pkg/PLIST-main 2 Nov 2017 14:40:13 -0000
> @@ -3,13 +3,12 @@
> @option is-branch
> @conflict python->=3.6,<3.7
> @pkgpath lang/python3/3.6,-main
> -@comment bin/pip3
> @comment bin/2to3
> bin/2to3-3.6
> -@comment bin/pydoc3
> +bin/pydoc3
> bin/pydoc3.6
> -@comment @bin bin/python3
> -@comment bin/python3-config
> +bin/python3
> +bin/python3-config
> @bin bin/python3.6
> bin/python3.6-config
> @bin bin/python3.6m
> @@ -122,7 +121,7 @@ include/python3.6m/weakrefobject.h
> @comment lib/libpython3.so
> lib/pkgconfig/python-3.6.pc
> lib/pkgconfig/python-3.6m.pc
> -@comment lib/pkgconfig/python3.pc
> +lib/pkgconfig/python3.pc
> lib/python3.6/
> lib/python3.6/LICENSE.txt
> lib/python3.6/__future__.py
> @@ -3398,7 +3397,7 @@ lib/python3.6/xmlrpc/client.py
> lib/python3.6/xmlrpc/server.py
> lib/python3.6/zipapp.py
> lib/python3.6/zipfile.py
> -@comment @man man/man1/python3.1
> +@man man/man1/python3.1
> @man man/man1/python3.6.1
> share/doc/python3.6/
> share/doc/python3.6/CHANGES.OpenBSD
>
--
Antoine