Index | Thread | Search

From:
Landry Breuil <landry@openbsd.org>
Subject:
Re: stop mentioning python 2 in python-module(5)
To:
ports@openbsd.org
Cc:
sthen@openbsd.org
Date:
Tue, 19 Aug 2025 12:29:02 +0200

Download raw body.

Thread
Le Tue, Aug 19, 2025 at 11:10:38AM +0100, Stuart Henderson a écrit :
> On 2025/08/16 13:04, Daniel Dickman wrote:
> > Cleanup some older references to Python 2 from python-module(5).
> >
> > ok?
>
> There is a question of whether this should document what's actually
> there, or how we want things to be..
>
> Hmm. What do you think of moving py2 support to a separate python2
> module and simplifying python.port.mk now that we no longer have
> multi-version Python ports?
>
> > Index: python-module.5
> > ===================================================================
> > RCS file: /cvs/src/share/man/man5/python-module.5,v
> > diff -u -p -u -r1.18 python-module.5
> > --- python-module.5	16 Aug 2025 16:43:06 -0000	1.18
> > +++ python-module.5	16 Aug 2025 17:02:58 -0000
> > @@ -37,12 +37,7 @@ in the
> >  .Xr ports 7
> >  tree.
> >  .Pp
> > -By default, the module builds ports using Python 3.
> > -For legacy ports using Python 2,
> > -.Ev MODPY_VERSION
> > -may be set manually to ${MODPY_DEFAULT_VERSION_2}.
> > -.Pp
> > -The module then sets
> > +The module sets
> >  .Ev MODPY_BIN ,
> >  .Ev MODPY_INCDIR ,
> >  .Ev MODPY_LIBDIR ,
> > @@ -135,7 +130,7 @@ Some checks are done to warn during "mak
> >  .Ev MODPY_PYBUILD
> >  appears to be set incorrectly.
> >  .Pp
> > -Python 2 and some older Python 3 ports using setuptools still set
> > +Some older ports using setuptools still set
> >  .Ev MODPY_SETUPTOOLS
> >  to Yes, which appends to
> >  .Ev MODPY_BUILD_DEPENDS
> >
>
> btw, here are the last of the py3 MODPY_SETUPTOOLS users needing moving
> to MODPY_PYBUILD at some point. if anyone fancies helping out, that
> would be nice...
>
> databases/py-bsddb3 (broken anyway but kopano-core pulls it in)
> devel/kf5/kapidox
> devel/py-lief
> devel/spyder
> education/anki (stuck on older version due to fiddly rust integration; might not work properly any more anyway)
> games/unknown-horizons
> geo/gdal

will look at this one shortly, sorry it fell off my radar.

> geo/mapserver

diff below for this one, most of the gory details of running pip commands
from cmake are in
https://github.com/MapServer/MapServer/blob/branch-8-4/src/mapscript/python/CMakeLists.txt#L66.
afaict the pip plumbing is not used during build, but during fake, and .. it
could be improved wrt HOME ?

1755599149===>  Faking installation for mapserver-8.4.0
-- Install configuration: "Release"
WARNING: The directory '/mapserver-8.4.0_writes_to_HOME/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
Processing /usr/obj/ports/mapserver-8.4.0/build-amd64/src/mapscript/python
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Building wheels for collected packages: mapscript
  DEPRECATION: Building 'mapscript' using the legacy setup.py bdist_wheel mechanism, which will be removed in a future version. pip 25.3 will enforce this behaviour change. A possible replacement is to use the standardized build interface by setting the `--use-pep517` option, (possibly combined with `--no-build-isolation`), or adding a `pyproject.toml` file to the source tree of 'mapscript'. Discussion can be found at https://github.com/pypa/pip/issues/6334
  Building wheel for mapscript (setup.py): started
  Building wheel for mapscript (setup.py): finished with status 'done'
  Created wheel for mapscript: filename=mapscript-8.4.0-cp312-cp312-openbsd_7_7_amd64.whl size=424018 sha256=1dd65d3dbbba984dea94fd51f763b0d0d27dcd661735570f7b6b74187aba1e67
  Stored in directory: /tmp/pip-ephem-wheel-cache-papcxvw2/wheels/80/4b/be/d791bb7a51f2b42adad8bc25509ee234fd6f254edf61d447a8
Successfully built mapscript
Installing collected packages: mapscript
Successfully installed mapscript-8.4.0

--- Makefile    15 Jan 2025 18:36:55 -0000      1.102
+++ Makefile    19 Aug 2025 10:23:09 -0000
@@ -13,6 +13,7 @@
 PKGNAME-php=   php-mapscript-${V:S/-//}
 PKGNAME-perl=  p5-mapscript-${V:S/-//}
 PKGNAME-python=        py3-mapscript-${V:S/-//}
+REVISION=      0

 SHARED_LIBS += mapserver 8.0

@@ -32,7 +33,7 @@
 MODULES=       lang/php lang/python devel/cmake
 MODPHP_BUILDDEP=Yes
 MODPHP_RUNDEP= No
-MODPY_SETUPTOOLS=      Yes
+MODPY_PYBUILD =        setuptools
 MODPY_DISTV=   ${V:C/-beta.//:C/-rc.//}
 CONFIGURE_STYLE=cmake

@@ -46,7 +47,6 @@

 BUILD_DEPENDS +=       devel/swig databases/postgresql,-server
 BUILD_DEPENDS +=       devel/py-pip
-BUILD_DEPENDS +=       devel/py-wheel

 LIB_DEPENDS=   devel/proj \
                devel/fribidi \