Commit Graph

756 Commits

Author SHA1 Message Date
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
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 715da6b739 unbreak python-idle installation, the update to 3.11.8 introduced a conflict 2024-05-20 19:16:00 +00:00
sthen 622f386d9c fix typo in @pkgpath lines for -tests 2024-05-09 16:09:57 +00:00
sthen dc0bb09e05 no more need for MODOY_DEFAULTONLY 2024-05-06 18:53:19 +00:00
sthen 473ad1cb64 need to merge in lang/python/3.11,* via @pkgpath too 2024-05-06 16:19:11 +00:00
sthen 83d0e78d80 add @pkgpath markers, problem reported by solene@ 2024-05-06 14:28:47 +00:00
sthen 32abb94496 rm old py3.x versions 2024-05-06 12:20:32 +00:00
sthen a645ab48e9 switch default py3 version to 3.11
looks reasonable to tb@
2024-05-06 12:20:20 +00:00
sthen aabab6cfda add python 3.11 under lang/python/3 (moving to simpler single-py3-version
layout alongside the switch to using python 3.11 by default - multiple 3.x
versions haven't been useful enough to be worth the extreme pain to keep
@conflict markers correct now that we have -stable packages to deal with).

looks reasonable to tb@
2024-05-06 12:19:33 +00:00
tb fee62672c5 python/3.9: backport change to use X509_STORE_CTX_get1_objects()
Hopefully this port will leave the tree soon enough, but since I have
this fix in my tree for a few months now, I might as well land it.

ok sthen
2024-04-18 12:31:33 +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 77160f4cc0 remove old @comments in PLIST, from daniel@ plus REVISION-main bump. 2024-04-14 00:30:58 +00:00
sthen b6524ac7f1 update to python-3.11.9, ok tb
https://www.python.org/downloads/release/python-3119/
2024-04-13 16:51:07 +00:00
sthen db31a0eeed update to python-3.9.19, ok tb
https://www.python.org/downloads/release/python-3919/
2024-04-13 16:50:47 +00:00
sthen 73418cfb20 update to Python 3.10.14
https://www.python.org/downloads/release/python-31014/

from daniel@, fixes from tb@, ok tb
maintainer timeout
2024-04-13 13:46:09 +00:00
sthen 33c658f739 mention ERR_get_state() removal in CHANGES.OpenBSD, spotted by tb@ 2024-03-24 09:38:44 +00:00
sthen 122c223f47 use "if [ ...; then; fi" rather than "[ ..." to avoid an error exit code
if the file doesn't exist; unbreaks 2.7/3.9, found by aja@
2024-03-24 08:50:43 +00:00
sthen 841deecf45 Include an EXTERNALLY-MANAGED file in the Python packages, which triggers
a warning if users attempt to install modules system-wide outside the
ports/packages system.  ok kmos@
2024-03-23 12:35:27 +00:00
sthen d7dbb9e6c8 Modify Python ctypes' find_library to pass "libc.so" to dlopen() rather
than attempting to resolve a version number by parsing ldconfig -r output,
which results in loading an incorrect version in some cases.  ok kmos@
2024-03-23 12:32:22 +00:00