Commit Graph

178 Commits

Author SHA1 Message Date
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
sthen 80fda491b1 switch MODPY_DEFAULT_VERSION_3 to 3.10 2022-11-13 15:26:02 +00:00
kmos 633af1ae20 Add Python 3.11.0 to build and python.port.mk
ok sthen@ tb@
2022-10-31 22:06:28 +00:00
sthen 3c1c57ea49 add notes about keeping REVISION/PKGNAME in -current/next release above the
version in -stable of the previous release when plist is changed etc
(e.g. backporting updates to -stable after swotching the default
Python version during a release cycle means that -current needs
to keep ahead of -stable, to avoid problems with -stable packages
at the next release)
2022-10-23 10:14:04 +00:00
sthen 2206a80000 rename MODPY_PEP517 to MODPY_PYBUILD which is a bit less of a
magic-numbers name and more of a nod at the frontend we're actually
using for the build.
2022-09-13 20:56:17 +00:00
sthen d1168dff6f add MODPY_PEP517=setuptools_scm to add the extra dep 2022-09-12 19:52:16 +00:00
sthen df75ef21c7 fix r1.164 differently, don't adjust MODPY_CMD which is actually used
in port Makefiles (I thought it was internal). fixes calibre
2022-08-29 15:43:20 +00:00
sthen 2628d6aa03 set "nojunk" for setuptools builds done via MODPY_PEP517 (already set
for those builds done via MODPY_SETUPTOOLS - I was hoping we'd get
away without it for pep517 setuptools builds but naddy ran into a
build problem with py-cryptography which seems that it can only have
happened if importlib-metadata was installed and junked at the wrong
time during build)

we _may_ need nojunk for the other pep517 backends but let's try to
avoid it if possible first.
2022-08-29 13:23:02 +00:00
sthen 0d61a66187 make sure MAKE_ENV is passed in for MODPY_PEP517 builds 2022-08-26 13:39:36 +00:00
sthen 20f0a9c7c7 setup default MODPY_TEST_LIBDIR to include the build dir used by pep517 ports 2022-08-22 14:42:38 +00:00
sthen 8fc67391ae PEP 517-based ports don't have "./setup.py test" (which was deprecated
anyway), so in the case of MODPY_PEP517, default to MODPY_PYTEST=Yes to
use py-test infrastructure.
2022-08-22 11:16:50 +00:00
sthen cbe17bf091 add src to PYTHONPATH for MODPY_PYTEST ports (as well as
the existing lib, src, and the constructed lib.openbsd-$OBSD_VER-arch-$PY_VER)
2022-08-18 19:32:47 +00:00
sthen e77e795dc1 handle MODPY_PEP517=poetry-core for automatically adding the bdep, ok kmos@ 2022-08-18 00:50:52 +00:00
sthen 35f910e621 use ${MODPY_BIN} -m build rather than pip to build wheels 2022-08-16 12:10:28 +00:00
sthen 08ce32504c don't trigger the MODPY_PEP517 printf unless there's a build-backend line
in the file for now
2022-08-15 23:06:29 +00:00
sthen 56a3e4da96 MODPY_PEP517=setuptools also needs py-wheel 2022-08-15 11:51:42 +00:00
sthen b146ee177c add setuptools as a MODPY_PEP517 backend.
change from substring match to equality checks so that e.g. listing multiple
backends for MODPY_PEP517 isn't allowed (AFAIK it won't be needed anyway,
it's possible to just set "yes" instead of a backend name and list the
deps in a port itself, plus it wasn't handled properly in the pile of
.elifs).
2022-08-15 10:58:15 +00:00
sthen cadb24e98d Print some text to show in the log when generating a minimal setup.py
for setuptools ports with no distributed setup.py file; this suggests that
they probably ought to use MODPY_PEP517 instead so it's helpful to have
this show up in build logs.
2022-08-15 10:55:56 +00:00
sthen 831f6c45e9 don't allow setting both MODPY_SETUPTOOLS and MODPY_PEP517 2022-08-14 13:22:57 +00:00
sthen 0260e06f81 allow MODPY_PEP517=Yes to avoid the fatal, it is needed in some
cases (e.g. when using build backend internal to the distribution)
2022-08-13 17:20:17 +00:00
sthen 58ebbb9cb3 add a Fatal for unknown MODPY_PEP517 values. 2022-08-13 17:18:16 +00:00
sthen b884d8b9ee s/hatch/hatchling/ for MODPY_PEP517 2022-08-13 17:16:37 +00:00
sthen 4c3986bdbb add build infrastructure for Python ports using PEP517, ok kmos 2022-08-13 17:10:46 +00:00
sthen 93b5f0d3b1 remove unnecessary "s in variables passed to pkg_create (one remains,
for a string with trailing whitespace).
2022-08-13 17:05:19 +00:00
kmos 64f7bd3d5d Retire and remove Python 3.8 from the ports tree.
A release has already happened with 3.9 as the default python 3
version.

ok sthen@
2022-08-11 02:15:02 +00:00
sthen 418e62139b tweak the simple generated setup.py script currently used for
pyproject.toml-only ports - add a comment making it clear that it was
generated by python.port.mk; makes it easier to identify where it came
from when looking at files in a port's WRKSRC
2022-08-04 19:15:59 +00:00
sthen bc45e220d6 @conflict with old setuptools as well as pip, there are lib/python3.8 ensurepip files 2022-04-02 08:11:11 +00:00
sthen d66dc91f39 python-3.8 needs to confluct wuth old versions of py3-pip.
Since the non-default versions of Python now have pip executables
(in this case named bin/pip3.8) when updating from the OpenBSD version
where that file was in py3-pip, pkg_add needs to merge the updates
of the new py3-pip and python-3.8 packages. Found by sdk@ testing
7.0->-current updates. Add to the "switching default version"
checklist.
2022-04-02 08:04:13 +00:00
sthen b47a629bac Include pip in the non-default versions of Python, so that for example
if you want to run some software that needs an older or newer version
of Python you can do so in most cases. For the default versions (2.7, 3.9)
pip is available from the separate port (devel/py2-pip, devel/py-pip).
Factor out some common parts to ../Makefile.inc while there. OK kmos@
2022-03-28 15:48:24 +00:00
naddy e93f9d0ca9 drop RCS Ids 2022-03-11 19:28:46 +00:00
sthen 4aa30352a1 For ports using MODPY_PYTEST, disable tests for Python 2. ok kmos
It doesn't cover every py2 port that uses py-test, but it lets us
whittle down the number. The remaining py2 ports using py-test can then
either move to using MODPY_PYTEST (preferably) or a flavour-dependent
NO_TEST directly until we remove all use of py2 py-test and can then
update the py-test stack.
2022-02-25 18:31:30 +00:00
sthen b10dab3f2e In the Python module, handle ports which use setuptools with only
setup.cfg and not setup.py, by writing a small wrapper if needed.
ok kmos@
2022-01-26 00:03:23 +00:00
sthen 432a74da1f fix conflict markers in comments 2021-11-03 19:08:27 +00:00
sthen 867b1fe793 unbreal build, should not conflict with py2 2021-11-03 19:07:18 +00:00
sthen c53c497e1c move "MODPY_TEST_LIBDIR ?=" (empty setting) below the .if block which
sets MODPY_TEST_LIBDIR to a default set of lib directories for
MODPY_PYTEST ports, otherwise the empty setting takes precedence
2021-11-02 01:17:44 +00:00
sthen 4805e96969 switch default MODPY_DEFAULT_VERSION_3 to 3.9, ok kmos@ 2021-11-02 00:00:01 +00:00
sthen 7f0d1524e9 update notes on version switches 2021-11-01 17:16:23 +00:00
sthen bc96ab094e simplify switching default Python versions, ok kmos@
Add a new SUBST_VARS variable that is set to "@comment " on
most Python versions, but is set to "" on the default one. This makes
it easier to swap between default versions because you don't need
to figure out which @comments should be kept and which should be moved.

While there I remove some existing lines with @comment markers for
files that are not created by any of our current Python ports:

@comment bin/pyvenv
@comment lib/libpython3.8m.so (etc)

The @comment -> ${PY_DEFAULTONLY} change doesn't affect the generated
PLISTs at all, so for that a REVISION bump is unnecessary, but removing
the pyvenv/libpython3.Xm.so does require a bump
2021-11-01 16:56:24 +00:00
kmos 0bd996c76c Hook Python 3.10 into build and add the necessary bit to python.port.mk
to accept Python 3.10
2021-11-01 14:17:16 +00:00
kmos 8b0df7e981 If MODPY_TEST_ARGS are set, default MODPY_PYTEST to Yes
Additionally add the elaborate lib.openbsd.... directory and lib to
PYTHONPATH when testing

Diff from sthen with small tweak from me
2021-11-01 03:55:31 +00:00
kmos 2795ba2341 Bump the REVISION on all ports that use the python2 version of
py-setuptools.

Also change the lang/python module to use the new
devel/py2-setuptools for python2 ports

ok sthen@
2021-05-21 19:50:21 +00:00
sthen 745105c362 automatically handle ports which use the python module and have flavours
other than the usual "python3/<blank>" python version selection and
remove setting MODPY_VERSION=${MODPY_DEFAULT_VERSION_3} again from the
affected ports.
2021-02-23 22:04:35 +00:00
sthen ba6e5fa88d fix for unflavoured py3 ports 2021-02-23 20:55:02 +00:00
sthen 6d0b6da733 oops, I deleted a line by mistake before committing this. unbreak the tree. 2021-02-23 20:44:38 +00:00