Commit Graph

780 Commits

Author SHA1 Message Date
daniel e36fabdbd8 update Python to 3.12.12
https://docs.python.org/release/3.12.12/whatsnew/changelog.html#python-3-12-12

ok kmos@ (MAINTAINER), sthen@
2025-10-25 17:05:53 +00:00
sthen 22c389f838 drop MODPY_COMMENT, it is no longer used 2025-10-23 13:23:38 +00:00
sthen dcaba51f26 change UPDATE_PLIST_ARGS, we don't need MODPY_COMMENT any more as we no
longer handle py2+3 in the same port

(I'll remove them from existing ports sometime, but probably alongside
a switch to a newer python branch, as a sweep touches a lot of PLISTs)
2025-10-22 07:36:24 +00:00
sthen 7b21cc71c3 explicitly disable LTO on armv7 (and ld.bfd archs, though it wouldn't be
autodetected there anyway), otherwise python tries to use it and fails
(currently with SIGILL).

explicitly set --with-lto=no when we want it disabled, to make it clear.

clear up old .if block that just had comments in, talking about
--enable-optimizations. that wants revisiting now that we have newer
toolchain, but needs per-arch tests.

found by phessler, diff following discussions with phessler tb jca
2025-10-21 17:09:38 +00:00
sthen edf5050a4e drop MODPY_PYC_MAGIC_TAG and MODPY_PYOEXTENSION from py2 ports 2025-10-20 19:51:08 +00:00
sthen 09eea2b2c5 drop MODPY_PYCACHE and MODPY_ABI3SO from 2.7 python module 2025-10-20 19:46:06 +00:00
sthen 0485386113 drop MODPY_COMMENT from python/2.7 module 2025-10-20 19:33:08 +00:00
sthen f966398da1 set ONLY_FOR_ARCHS?=${RUST_ARCHS} for ports using setuptools-rust or
maturin in MODPY_PYBUILD, so we don't checksum a bunch of crates only to
bail out later when lang/rust is not found
2025-10-19 12:44:05 +00:00
sthen e69847b059 switch the MODPY_PYBUILD error for unknown backends to defer to python-modules(5)
rather than listing them directly
2025-09-17 22:14:32 +00:00
sthen fed66d8953 handle uv_build for MODPY_PYBUILD 2025-09-17 21:58:45 +00:00
sthen b6ee619f8d set BDEP for poetry-core ports to py3-poetry-core->=2.2.0, as the
location of installed license files has changed
2025-09-16 08:44:22 +00:00
sthen 19c89eb0fc helps if i copy the typo-fixed version from test builder 2025-08-21 11:56:10 +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
tb 6d982ea81c python/2.7: remove uses of CRYPTO_THREADID, ok kmos (maintainer)
These have been noops since forever, but we're at a point where we can
remove the type itself, so use one of the last consumers out of the way.
2025-06-27 04:03:27 +00:00
daniel dcfe611587 update Python to 3.12.11 for a few security fixes
ok kmos@ (MAINTAINER)
2025-06-14 20:08:20 +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
kmos 9a37aa379a https://docs.python.org/release/3.12.10/whatsnew/changelog.html#python-3-12-10
A couple of security fixes.

ok sthen
2025-04-15 20:36:43 +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
kmos 69947fda24 https://docs.python.org/release/3.12.9/whatsnew/changelog.html#python-3-12-9
Update to Python 3.12.9

ok sthen daniel
2025-02-16 20:43:07 +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 a5d4cc6841 fix pydoc3 shebang line, spotted by/ok semarie@ 2025-01-31 12:46:51 +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 a2ecae0b9d add a comment noting that DEBUG_PACKAGES in lang/python results in -g
getting added to _sysconfigdata, which results in some compiled Python
extensions picking it up.

noticed while investigating surprising memory use in LLVM 18+ while
compiling cython-generated C code (~700MB in LLVM 16/17; 10GB+ in 18).
llvm #124749
2025-01-28 15:08:56 +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
daniel b22e2d7525 clean up some @comment entries; ok sthen@ 2024-12-28 15:46:22 +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 d31d6ccbc8 fix conflict markers 2024-12-21 16:21:41 +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 67779e99bf add missing @conflict needed for merging in meta/python3 2024-09-30 09:23:10 +00:00
sthen 4bb1058856 move some python 2.7-only CONFIGURE_ARGS to an .if block so they don't trigger
warnings from autoconf when building 3. change is a noop (same flags for 2.7,
and the flags were not supported in 3).
2024-09-12 11:40:45 +00:00
sthen 9a656e2053 update to Python 3.11.10, from tb@ (who tested in bulk build on amd64, and
on sparc64 - I tested aarch64) with a few tweaks to allow updating stable.

merge meta/python3 into lang/python/3, there's no need for the separate
empty package any more now that we only have one 3.x version (pkg_add
python%3 will work).

tb's version was OK kmos@
2024-09-12 11:39:07 +00:00