| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
Depend on `>=dev-lang/pypy-3.10:=` rather than the backwards
compatibility `dev-python/pypy3` package. Note that the package needs
to remain at least for some time after the next subslot bump, so that
users rebuild all packages and get the updated dependency across
the system.
Note that this requires pkgcheck to be updated first.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Move the python3_13t target on the list before other CPython targets.
This means it's technically "less preferred", so e.g. *all phases
would rather be performed with regular CPython, which should generally
be more faster.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Signed-off-by: Eli Schwartz <eschwartz@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
| |
Closes: https://github.com/gentoo/gentoo/pull/37652
Signed-off-by: David Seifert <soap@gentoo.org>
|
|
|
|
| |
Signed-off-by: David Seifert <soap@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
This is just like python_get_sitedir, but it returns the stdlib
directory such as /usr/lib/python3.12. This is useful for locating the
sysconfigdata file.
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
| |
Add a sanity check that ensures that PYTHONPATH does not contain any
relative paths. While at it, also explicitly warn about PYTHONPATH
being set, so we know about it in build logs.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Fix epytest to call `die -n` after performing the cleanup, rather than
before. This ensures that stray cache files are cleaned up even if
we're actually going to die, e.g. when using
`FEATURES=test-fail-continue`.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/36672
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
| |
Closes: https://bugs.gentoo.org/905863
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Explicitly error out if epytest is run without an appropriate async
plugin, and the test suite contains async tests. Currently, these tests
are skipped with a warning but that is usually a mistake, and one can
easily miss it when pytest-asyncio or a similar plugin is installed
on the test system. However, a missing dependency can result
in the tests being skipped afterwards on the tinderbox.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/35913
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
python_get_includedir is prefixed with ESYSROOT, not EPREFIX, so we need
to strip off the former, not the latter.
This is currently only used for dev-python/pillow, which I have tested.
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
compat check)
We introduced this in ddd9cd63e860ce71ad5f92e80a3e6e4be901af8a but it's UB
to use ${EBUILD} and pkgcheck nowadays has OldPythonCompat for this.
Bug: https://github.com/pkgcore/pkgcheck/issues/591
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Update epytest to respect the modern NO_COLOR variable rather than
Portage's old NOCOLOR. Adjust it to correctly check whether it is set
at all rather than to a specific value, to match the behavior of pytest
itself.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
| |
Modify `epytest` not to pass our plethora of `-p no:*` arguments
when `PYTEST_DISABLE_PLUGIN_AUTOLOAD` is set. This is NFC since
the plugins wouldn't be loaded anyway.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
| |
Fix `epytest` with `EPYTEST_XDIST` not to pass a duplicate `-p xdist`
when `xdist.plugin` is already present in `PYTEST_PLUGINS`. Otherwise,
pytest will fail due to the plugin being loaded twice.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
| |
Make `distutils_enable_tests pytest` automatically add
the `dev-python/pytest-xdist` dependency if `EPYTEST_XDIST` is set.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Add an `EPYTEST_XDIST` variable that can be used to enable running
the test suite in parallel via the dev-python/pytest-xdist plugin.
This also includes user-facing `EPYTEST_JOBS` to control the job count
independently of `MAKEOPTS`.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
| |
Disable the intrusive dev-python/pytest-plus plugin by default as it
is breaking random test suites.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
If the current directory masks packages that would be installed and
contains different contents, it can cause testing issues that otherwise
go unnoticed. This warning can stop being experimental and opt-in
Suggested-by: Michał Górny <mgorny@gentoo.org>
Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/32729
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
| |
We recently supported cross-prefix by rewriting PYTHON_SITEDIR and
PYTHON_INCLUDEDIR from BROOT to EPREFIX. We now know that you can get
sysconfig to use EPREFIX in the first place, which is cleaner.
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We dynamically determine Python's SITEDIR and INCLUDEDIR using the build
host's Python. This breaks down when the build host's prefix differs
from the target host's prefix, so chop off the former and prepend the
latter.
This assumes that each Python implementation is always installed using
the same scheme. Meson already makes this assumption, and gpep517 makes
a similar assumption to determine Python's stdlib location.
We could improve on this and determine these locations using SYSROOT's
sysconfigdata file, like gpep517 does, but this seems needlessly
complex. We would need to take this approach for PYTHON_LIBPATH and
PYTHON_CONFIG, but these are only used by handful of packages.
${BROOT-${EPREFIX}} is needed rather than plain ${BROOT} for the same
reason we need it for PYTHON, namely that Portage <3.0.50 was buggy.
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Modify the occluded package check to unidirectionally check for
additional files in installed package directory. This eliminates false
positives when the source directory contains additional files,
in particular C sources.
This change also eliminates the dependency on diff(1), in favor
of comm(1). As a side effect, we no longer compare .py files for
equality but that shouldn't be such a big deal.
Closes: https://github.com/gentoo/gentoo/pull/32195
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 9e4dc068a3066434bfbfa3a0f979ec5d6d8020eb. It fixed
cross-prefix but inadvertently broke regular prefix. Both were
ultimately affected by the same PMS + Portage bug where BROOT was not
set in pkg_preinst. This has now been fixed, but regular prefix users
need to be able to update Portage without hitting the issue.
Cross-prefix users are safe because the BROOT Portage can be updated
without hitting the issue.
Closes: https://bugs.gentoo.org/911797
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Add a check for installed packages being occluded by the working
directory when calling epytest and eunittest. This is primarily meant
to detect C extensions being missed.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/32181
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
${PYTHON} points to BROOT's Python because it's usually used for calling
Python during the build. This value will be wrong at runtime after
building cross-prefix.
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
This eclass is EAPI 7+ now, so we can assume that BROOT is available.
This was broken anyway because it seems that Portage doesn't set BROOT
when it's empty.
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Loosen minimal Python versions to accept any version in a given slot.
Lower bounds are cumbersome to maintain and cause problems when
upgrading outdated systems, particularly when sys-libs/glibc
is involved.
We could technically apply some hack to make any-r1 dependency checks
to conditionally ignore minimal versions but that sounds like
unnecessary complexity. In the end, minimum versions were primarily
enforced to make sure users got the latest bugfixes but that doesn't
seem strictly necessary.
Closes: https://bugs.gentoo.org/910288
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/31796
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use bash 5's @a variable substitution instead of `declare -p` check
to determine if `PYTHON_COMPAT` is an array. This avoids a subshell,
and effectively makes the function roughly 3.5x faster:
```
* Timing _python_set_impls
real 4854 it/s
user 4862 it/s
```
In practice, this roughly reduces total sourcing time for `dev-python/*`
from 57-58 s to 54 s.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/31454
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
| |
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/31180
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
| |
Starting with Python 3.12, the standard unittest runner exits
unsucessfully if no tests are found. Therefore, we no longer need
to use unittest_or_fail.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
The PYTHON variable is used for the wrapper shebangs. These should point
to the build system rather than the host system. The variable is also
used in other contexts, but the build system is still likely to be most
appropriate. If this does break anything, it'll only be for prefixed
systems.
Signed-off-by: James Le Cuirot <chewi@gentoo.org>
|
|
|
|
| |
Signed-off-by: David Seifert <soap@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
The eclass was modified to drop support for Python 2.7, however as
unintended side effect, support for Jython 2.7 was also removed in
python_optimize().
Fixes: 3b11f851df5e ("python-utils-r1.eclass: Clean up post disabling python2_7 compat")
Closes: https://bugs.gentoo.org/885971
Closes: https://github.com/gentoo/gentoo/pull/29038
Signed-off-by: Florian Schmaus <flow@gentoo.org>
|
|
|
|
| |
Signed-off-by: David Seifert <soap@gentoo.org>
|
|
|
|
|
|
|
| |
Bump minimal Python versions after the last security stabilizations,
plus PyPy3 sysconfig bugfix.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|