Commit Graph

221 Commits

Author SHA1 Message Date
sthen ff78cf771d update python/3 to 3.14.4, ok tb (who also helped with build tests and
fixing up other ports etc), daniel

a few changes to follow

_MODPY_SYSTEM_VERSION bumped rather than bumping ERANGE ports
2026-05-12 13:45:10 +00:00
sthen 3fd2581a3b add -V 1 to PKG_ARGS for ports using python 3, so that updates work without ERANGE bumps 2025-11-14 17:46:39 +00:00
sthen 1d2a94aab9 split python.port.mk into simpler files for 2.7 (which doesn't need
MODPY_PYBUILD etc) and 3 (which doesn't remove all that much yet, but
when the remaining py3 MODPY_SETUPTOOLS are gone we'll be able to
remove the confusing conditionals around that)

been through enough of a bulk for confidence
2025-08-21 10:43:06 +00:00
sthen 5b7d92b42b set PYTEST_DEBUG_TEMPROOT in TEST_ENV for MODPY_PYTEST ports; uses
WRKDIR rather than defaulting to /tmp for test work files
2025-08-01 11:32:34 +00:00
sthen 69a8069556 check for ports which need py-coherent.licensed and warn if no BDEP 2025-06-27 09:53:23 +00:00
kirill 07e4cc49fc python.port.mk: fix MODPY_TEST_LINK_SO after add ${WRKSRC} to MODPY_TEST_LIBDIR
${WRKSRC} which was added MODPY_TEST_LIBDIR brokes MODPY_TEST_LINK_SO as
side effect because it introduced a cyclic loop for resulted symlinks.

OK: sthen@
2025-05-15 10:21:04 +00:00
sthen f402bce3c7 sort list of MODPY_PYBUILD options in error text 2025-05-13 15:43:12 +00:00
sthen 6220a03a32 require version >=79 (with v0 for EPOCH) when building setuptools ports
installed files are in different locations in the dist-info directory
(names are normalized, and licenses move to a subdirectory), so PLISTs
generated on older versions won't package on newer versions and vice-versa
2025-04-29 10:35:26 +00:00
sthen 88395cce81 add ${WRKSRC} to MODPY_TEST_LIBDIR 2025-03-25 09:29:58 +00:00
sthen 1d758c88f0 specify flit_core minimum version; older ones won't package most ports as
PLISTs have changed
2025-02-21 10:26:49 +00:00
sthen 6d7b8aa9f8 go back to using nojunk for setuptools ports.
setuptools opportunistically picks up extensions and builds can fail if
dpb junking occurs during build (only really likely on a slower building
port with compiled code rather than a pure Python port). it doesn't
happen _all_ that often (I've gone months without seeing it in my i386
bulk builds) but isn't that easy to identify from the logs and people
that can run more jobs in parallel hit it more frequently, so let's go
back to nojunk and see how we go.
2025-02-14 10:50:52 +00:00
sthen ad30940204 check if BUILD_DEPENDS is defined before trying to access it
problem found by aja, fix suggested by tb
2025-02-05 14:04:17 +00:00
sthen 069c4d66ce add a BDEP on pythran for ports using cython, unless MODPY_CYTHON_PYTHRAN_RDEP
is set (used in py-numpy to break a dependency loop). suggestion of doing it
this way rather than with a PKGPATH check from tb@.
2025-02-05 10:25:00 +00:00
sthen 67aa8a0a54 avoid tripping the setuptools_scm warning if setuptools_scm is in BUILD_DEPENDS
(use case: setuptools-rust has some fiddly setup so if you use that, it needs
to be in MODPY_PYBUILD, if the port also need setuptools_scm you would then
need to list in bdep, and we don't really want the warning in that situation).
2025-01-31 12:23:50 +00:00
sthen 07a351efae use grep -w when checking for expected MODPY_PYBUILD backend;
fixes the warning when you specify "flit" but actually need "flit_core"
2025-01-27 15:40:15 +00:00
sthen 90c20e4de8 tweak trigger for the warning message about setuptools_scm being needed
but not used
2025-01-19 13:49:38 +00:00
sthen 4ecd4898be introduce MODPY_TEST_LINK_SRC, allowing MODPY_TEST_LINK_SO to place links
somewhere other than the default (WRKSRC).
2025-01-17 08:45:12 +00:00
sthen f65672c310 grep for ^requires.*setuptools[-_]scm, not just ^requires.*setuptools_scm,
in the check when printing a warning that a port might not have registered
that setuptools-scm is needed.
2024-12-30 17:01:21 +00:00
sthen 807c6a8822 handle MODPY_PYBUILD=pbr 2024-12-27 20:44:19 +00:00
sthen b04315627d better handling for MODPY_PYBUILD=maturin without needing a bunch of
separately defined targets.
2024-12-27 13:56:59 +00:00
sthen f6bb72e26a handle MODPY_PYBUILD=mesonpy 2024-12-26 15:44:34 +00:00
sthen bf41de17e3 Remove pre-build fragment to generate a minimal setup.py for Python ports
which don't have one - these should just use MODPY_PYBUILD.

The warning message printed by this is not triggered in bulk builds.
2024-12-26 13:57:58 +00:00
sthen 2be6a44549 only print MODPY_PYBUILD message if pyproject.toml exists for Python 3,
MODPY_PYBUILD isn't used for 2.7.
2024-12-26 11:03:27 +00:00
sthen fa99bbe6b1 carry out a few more checks on MODPY_PYBUILD settings, which identify some
common mistakes (in particular, missing changes to build system done with an
update).

not fatal because sometimes there may be a reason for it not matching up,
but it's not resulting in many false warnings.

defer printing this until fake-install where it's more likely to be seen
(otherwise it's likely to be hidden by a wall of scrolling messages with
some build systems).
2024-12-23 14:36:21 +00:00
sthen a9fb5e6ee0 minor tweaks, mostly to comments 2024-12-23 14:30:46 +00:00
sthen 999161335d update python/3 to 3.12.8 and do some other overhaul while there
(since any python branch switch touches thousands of ports):

- stop using FLAVOR=python3 / MODPY_FLAVOR / etc in py3 ports.

- rename MODPY_EGG_VERSION (which refers to an obsolete packaging
format) with MODPY_DISTV (easier to type and line up in Makefiles)

bumps and adjustments to follow. lots of help from tb@, thanks!
2024-12-21 11:32:44 +00:00
sthen 2ca9d0b331 support setuptools-rust for MODPY_PYBUILD 2024-12-20 12:10:02 +00:00
sthen 3b6e41722a retire MODPY_BIN_SUFFIX, there are no Python 2 ports using it, and it
has been set to <empty> on py3 ports since Feb 2021, since when there
has been enough churn that existing PLIST entries etc referencing it
are not trustworthy. no change to python-module(5) needed as it wasn't
documented there anyway.
2024-12-18 19:20:36 +00:00
kirill 0195869583 lang/python/python.port.mk: introduce MODPY_TEST_SO_CMD
When MODPY_TEST_LINK_SO is enabled, python.port.mk links all .so files
in ${WRKSRC} which is required when port using tests which use Python
code that loads .so files via relative imports.

tweeks, feedback and OK: kn@ sthen@
2024-10-28 19:44:21 +00:00
sthen f63a131566 fix logic error introduced while sorting in previous 2024-07-25 15:42:03 +00:00
sthen 83bf201f4b handle MODPY_PYBUILD=pdm 2024-07-25 15:35:38 +00:00
sthen 30b455efbd let MODPY_COMPILEALL work as far as it can for py2 2024-05-28 21:14:52 +00:00
sthen 90bf4dd7c0 Add MODPY_COMPILEALL with a standard invocation to run "compileall".
Compared to the various ad-hoc ones used in the ports tree, this sets
parallelism if MAKE_JOBS is set, strips ${WRKINST} from the pyc files
(i.e. the pobj directory), and uses standard optimization levels.

(I have diffs for the various ports using ad-hoc compileall.py that
I'll test)
2024-05-28 16:04:58 +00:00
sthen 74da50600f Allow setting MODPY_PYTEST_USERARGS as a user setting (e.g. in /etc/mk.conf)
adding to the standard pytest command line. Can be used for e.g. -v (to add
verbosity), --color=yes, adjust traceback print mode, etc. See "py.test -h".
2024-05-28 16:02:11 +00:00
sthen a645ab48e9 switch default py3 version to 3.11
looks reasonable to tb@
2024-05-06 12:20:20 +00:00
sthen aaf344ca94 rename MODPY_PYBUILD=bootstrap to MODPY_PYBUILD=other as there are some less
common backends (like pdm-backend) which don't seem particularly widely used
so it seems useful to have a generic mechanism for these.
2024-04-17 13:33:56 +00:00
sthen f7f9dcc87a add maturin as a build backend for MODPY_PYBUILD 2024-04-14 12:08:52 +00:00
sthen ad9c4806d2 add python to TEST_DEPENDS if MODPY_PYTEST is set to 'no'. 2024-03-18 14:33:13 +00:00
sthen bf893086f3 handle MODPY_PYBUILD=jupyter_packaging 2023-12-22 12:51:20 +00:00
sthen ee25a7fcf0 Don't accept "Yes" as a value of MODPY_PYBUILD; use "bootstrap" instead
for those special-case ports which bootstrap from their own internal
PEP517 build backend.
2023-12-20 13:29:33 +00:00
sthen 85dbbc61c4 allow settings args to MODPY_BUILD_TARGET for MODPY_PYBUILD
useful for e.g. adding --config-setting
2023-12-15 14:19:17 +00:00
sthen 68d5077ab5 handle MODPY_PYBUILD=flit_scm 2023-11-23 12:34:21 +00:00
sthen 9b03a9df17 SITES for MODPY_PI 2023-09-20 13:41:38 +00:00
sthen 9fdf3bd034 fix stupid editor linewrapping 2022-12-06 16:18:16 +00:00
sthen 0fa138d7d0 handle MODPY_PYBUILD=hatch-vcs 2022-12-06 16:17:25 +00:00
sthen bc85bbe650 list allowed values if an unknown MODPY_PYBUILD is used 2022-11-29 11:19:45 +00:00
sthen 57d2b90569 adjust warning text from the 'Try to detect the case where a port will
build regardless of setuptools' check to suggest MODPY_PYBUILD not just
MODPY_SETUPTOOLS
2022-11-28 21:16:55 +00:00
sthen d858b7cc2a Ports built with setuptools on python 3.10 don't need a RUN_DEPENDS on
setuptools (it's used as a package locator but importlib.metadata in
newer Python core or the external importlib_metadata are preferred).
So drop the RDEP in that case (it's still kept for py27) and bump
revisions.
2022-11-26 23:28:11 +00:00
sthen b7554f3b92 warn if MODPY_PYBUILD is used and not set to setuptools_scm when the
port appears to need setuptools_scm.
2022-11-25 16:33:15 +00:00
sthen f04e702653 use absolute paths in MODPY_TEST_LIBDIR, relative paths don't work if
MODPY_TEST_DIR is set
2022-11-25 16:32:04 +00:00