| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
|
|
|
| |
As requested.
Closes: https://github.com/gentoo/gentoo/pull/26317
Signed-off-by: Ionen Wolkens <ionen@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>
|
|
|
|
|
|
|
|
| |
Make it possible to use python_domodule() outside src_install(),
in order to install files into the ${BUILD_DIR}/install tree used
by distutils-r1.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
| |
Fix python_moduleinto doc to mention python_domodule rather than
python_doscript (copy-paste error, probably).
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
The test suites of pytest plugins cause additional *-pytest-*.pyc files
to be created. Remove them in order to prevent them from being
installed alongside the package.
Closes: https://bugs.gentoo.org/847235
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
| |
Switch epytest to report test counts rather than percentages. This is
more precise when we're dealing with large numbers of tests.
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>
Closes: https://github.com/gentoo/gentoo/pull/25238
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Change the behavior of python_fix_shebang to always output full path
to the Python interpreter (i.e. ${PYTHON}) instead of mangling
the original path. Most importantly, this ensures that:
1. EPREFIX is included in the final path
2. /usr/bin/env is replaced by the absolute path to avoid issues
when calling system executables from inside a venv
Note that this implies that a few unlikely corner cases may stop
working, notably:
a. "weird" shebangs such as "/usr/bin/foo python" will no longer work
b. the mangled scripts will escape temporary venv e.g. created
in distutils-r1 PEP517 mode (python_fix_shebang is not used in such
a way in ::gentoo)
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
| |
Bug: https://bugs.gentoo.org/835396
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Add a python_has_version() wrapper for convenient use
in python_check_deps(). It includes:
- verbose output
- default "-b" root that's more suitable for build-time checks
- forward compatibility for -b/-d/-r arguments in EAPI 6
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
The python_export_utf8_locale() function checks for missing locale(1)
and handles it gracefully. However, it does not redirect stderr
probably, so systems without the executable (e.g. musl) get unintended
console output. Redirect it to /dev/null.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
| |
Add a QA check that reports obsolete implementation in PYTHON_COMPAT
if ebuild has been modified in 2022 (based on copyright year).
Requested by sam.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Update _python_impl_matches() (used to implement python_gen*,
python_setup) to support specifying stdlib versions ("3.8", "3.9")
in addition to exact implementation names. This makes handling PyPy3
version changes much easier when dealing with backports.
For example, if you specify "3.8", then the spec will match python3_8
and pypy3, for as long as we supply PyPy3.8. Once we upgrade to PyPy3.9
completely, it will stop matching pypy3 and we won't have to manually
keep updating these deps.
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>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
| |
Remove python_export, as it is no longer used by any ebuilds
in ::gentoo.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fix the regression in calling sphinx-build for the non-autodoc case
that causes the build to fail if dev-python/sphinx isn't built
for the newest Python interpreter available. To account for this,
we need to call sphinx-build as an executable (i.e. via python-exec).
Ideally, build_sphinx would be aware of which case it is used for,
and use appropriate invocation. Unfortunately, we cannot do that
without breaking backwards compatibility. However, we can simply check
if Sphinx is available via ${EPYTHON}, and fall back to calling
python-exec directly. This is effectively equivalent to choosing
the specific invocation directly, as python-exec would have respected
the implementation specified by EPYTHON anyway if sphinx-build
executable was available for it.
Fixes: f6a17acb8b7c (...: Run sphinx-build via EPYTHON)
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
| |
Inline the python_is_installed function that is used exactly once
(in _python_run_check_deps). This helps us avoid having to grab
PYTHON_PKG_DEP twice.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
| |
Report dep checking progress verbosely, to help users understand why
a particular implementations was rejected or selected.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
| |
Add a function encompassing the common logic to run python_check_deps()
from python-any-r1 and python-r1.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Make epytest explicitly disable unwanted plugins such as pytest-cov
or pytest-flakes. We want the relevant options to be stripped out
of pytest config files. However, when these packages are installed
on the system, it's easy to miss them and then users (or tinderboxes)
hit the failures first. Disabling the plugins explicitly forces
them to fail immediately while testing.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Run sphinx-build via EPYTHON to ensure that the correct Python
executable is being used. Otherwise, sphinx-build runs via
/usr/bin/python* and does not respect the virtualenv boundaries.
Closes: https://bugs.gentoo.org/831565
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
| |
Force pytest color output on or off based on the presence and value
of NOCOLOR envvar. This fixes inconsistent use of colors that largely
depended on upstream pytest settings.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
| |
Bump minimal Python package versions to ensure that the python-exec deps
are inside.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Florian Schmaus <flow@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Support (potentially global-scope) EPYTEST_DESELECT and EPYTEST_IGNORE
arrays to conveniently deselect/skip tests. This effectively replaces
local hacks such as:
epytest ${deselect[@]/#/--deselect }
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Python 3.5 added support for compileall to run parallel workers for
performing bytecode compilation. Make use of it to the extent
possible without refactoring the code too much to get different
paths into the same call for best possible parallelization.
Signed-off-by: Mart Raudsepp <leio@gentoo.org>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
Python 3.9 includes a new feature for compileall to automatically hardlink
different optimization level cache files if they are identical. Make use of it
for python_optimize for some space savings.
This however does not cover distutils use cases and python itself.
Signed-off-by: Mart Raudsepp <leio@gentoo.org>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Make epytest clean up common cache directories .hypothesis
and .pytest_cache after the execution. If pytest is executed
in ${BUILD_DIR}/lib, these directories end up being wrongly installed,
and so far ebuilds had to handle cleaning them up.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make pytest pass -Wdefault in order to override upstream default warning
options that commonly include -Werror. This has often caused tests to
start failing due to new deprecation warnings introduced
in dependencies, or block new implementations due to harmless
deprecation warnings.
A side effect of this is that we are overriding all warning options used
by upstream. This could e.g. cause more warnings to be reported (when
upstream ignores some of them). This might also break badly written
tests (e.g. when they rely on exceptions to catch warnings).
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
| |
Reverts: 1f678a8cae66480493c43739435ec7feb85c08da
Signed-off-by: Mike Gilbert <floppym@gentoo.org>
|
|
|
|
|
|
|
|
| |
python_optimize is still used in dev-python/pypy.
Reverts: 964f5c61816659b0138c8fe98593786d9da7f084
Closes: https://bugs.gentoo.org/798330
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>
|
|
|
|
|
|
| |
We should be safe until Python 3.99 now ;-).
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
| |
There is no use for python_is_python3 anymore, as Python 2 is no longer
supported at runtime and the remaining any-r1 uses are pure-2.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|