| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
We need to remember to update metadata/install-qa-check.d/60python-pyc
in future to disable now non-applicable QA checks.
If we don't, we end up breaking older EAPI installs in general.
See: 1137a7ecce67c48fc9a69ab320c6156c40366122
See: bdcfb21ca5a84567e9c9d6a456374a05e798f78e
Bug: https://bugs.gentoo.org/704286
Bug: https://bugs.gentoo.org/781878
Signed-off-by: Sam James <sam@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
| |
Add '-l' to epytest, in order to improve tracebacks by including
the values of local variables.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Add an eunittest helper to wrap up the common 'python -m unittest
discover' calls, except that they are run via
dev-python/unittest-or-fail now. This guarantees that if no tests are
discovered the test phase fails rather than silently ignoring
the problem. This is especially helpful since it saves the developer
from having to inspect test phase logs.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
| |
python.eclass is gone for a long time, ::progress is discontinued,
it should be safe to assume people will no longer be copying old stuff.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
| |
Explicitly request pytest to display the summary of all test results
except for passing tests. This overrides the upstream defaults to
improve the quality of build logs.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduce an epytest helper to call pytest with the standard set
of options, and the standard error message. While
distutils_enable_tests made running pytest a lot easier, there are still
many cases when python_test() needs to be redefined in order to pass
additional options or perform additional actions. Having the extra
helper will reduce code duplication and make it easier to change
the standard options.
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>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The _python_impl_supported() function is not used anymore in its
original function. It is called only once, in order to die on incorrect
targets in PYTHON_COMPAT. Let's inline the corresponding logic
in _python_set_impls() and remove the function.
While at it, add an extra check for outdated patterns. This also
renders the relevant tests obsolete.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Make python_optimize() fail if the expected Python interpreter is not
executable. Since some errors are expected during Python
byte-compilation (e.g. CPython includes test .py modules with syntax
errors), we can't rely on compileall result. However, this will catch
at least the very bad mistake of wrong ${PYTHON} that affects e.g.
dev-python/pypy*.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Check for invalid implementation patterns passed to python_gen*
functions, python_setup, etc. Currently the functions silently ignore
pattern mismatches which is fine for patterns matching historical
implementations but also hides errors in patterns.
After this change, each pattern must match at least one current or
historical implementation. If no match is found, the function dies
indicating developer's mistake.
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://bugs.gentoo.org/720048
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Python 3.8+ provides two pkg-config files: python-3.8 for building
Python extensions and python-3.8-embed for embedding Python in other
programs. The former no longer lists -lpython*, resulting in empty
PYTHON_LIBS. Since our consumers are more likely to want it non-empty
if they already query it, switch to the latter file.
Closes: https://bugs.gentoo.org/718344
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
| |
Hopefully it resolves package issues that were caused by 3.7.6.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Bump minimal Python versions to current stable to save ebuilds from
having to hack around the dependencies.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/15135
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>
|
|
|
|
|
|
|
|
| |
This function was never meant to be a part of the public API. Correct
the mistake by renaming it to _python_wrapper_setup(), and adding a QA
warning under the old name.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
| |
Closes: https://bugs.gentoo.org/712526
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
| |
Do not create 'python.pc', only 'python[23].pc'. This seems to match
what other distributions are doing.
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>
|
|
|
|
|
|
|
| |
Depend on dev-python/pypy directly, as that's the common package
with the new layout.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Jython was supported as an experimental implementation but due to
interoperability issues and very slow development, its (re-)deployment
in ebuilds never took off. Now that Python 2.7 is going away, there's
no point in keeping its future support.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
| |
* With the EOL of CPython 2, we also want to
remove support for PyPy (i.e. PyPy for Python 2).
This change does not affect PyPy3, i.e. Pypy for
Python 3.
Signed-off-by: David Seifert <soap@gentoo.org>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
|
|
| |
* Python 3.5 will go EOL on 2020-09-13 and in order to reduce testing
and maintenance burden, we want to keep the number of active Py3
impls below four.
https://devguide.python.org/#status-of-python-branches
Signed-off-by: David Seifert <soap@gentoo.org>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
| |
Signed-off-by: David Seifert <soap@gentoo.org>
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Reliably allow empty pattern lists (equivalent to no restrictions)
in all pattern-based generator functions, notably python_gen_cond_dep.
Previously, only some of the functions accepted them while others
failed via _python_impl_matches function.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
| |
Introduce a helper to build HTML docs using Sphinx, providing for
Intersphinx cleanup and HTML_DOCS appending.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
| |
Fix _python_impl_matches() not to return early on unsuccessful -2/-3
match. This caused constructs such as '$(python_gen_cond_dep ... -2
python3_{5,6,7})' to ignore arguments following '-2'.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Make sure to append NUL to every path in sys.path, rather than using
it as a separator between output entries. This fixes a bug when
the last path entry was silently discarded, and the function stopped
working with PyPy as a result.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
| |
This turned out to be overzealous and broke calling external programs
that were using different Python version.
Reverts: 7f291f5759959bc338ca0b52b169871f0dccf9a9
|
|
|
|
|
|
|
|
|
|
|
|
| |
Improve the wrapper blocking logic to block specific Python versions
as well rather than just 2/3. In other words, for eselected pythonX.Y
both pythonZ (Z = X^1) and python*.* (!= X.Y) will be blocked.
Hopefully this will catch more build systems that hardcode Python
versions rather than respecting what we're giving them.
This will work only for build systems respecting PATH. Build systems
(and ebuilds) using /usr/bin path directly will still be able to use
other Python versions.
|
| |
|
| |
|
|
|
|
|
|
| |
Sanitize insopts/exeopts when calling doins/doexe, in order to avoid
prior insopts calls accidentally affecting do*/new* functions defined
by the eclass.
|
|
|
|
|
|
|
|
|
| |
Add initial EAPI 7 support. Handle trailing slash in D/ED correctly.
Support new has_version switches.
This does not provide proper cross support. In particular, the PYTHON
variable (full path to the interpreter) is used both in contexts
of BDEPEND and DEPEND, so we need to clean the uses first.
|
|
|
|
|
|
|
|
|
| |
Make the pattern matching code in _python_impl_matches() more lax,
allowing (accidental) mixing of PYTHON_COMPAT-style values with
EPYTHON-style values. This is trivial to do, and solves the problem
introduced by complexity-by-limitation of other eclasses -- where
patterns for dependency strings are using PYTHON_COMPAT syntax,
and patterns for python_setup are using EPYTHON syntax.
|
|
|
|
|
| |
The short terse error messages here are not easy to track down. Add
a few more details so people can figure out what's going wrong faster.
|
|
|
|
|
|
|
|
| |
This is intended to be set by the user when using ebuilds that may
have unknown implementations in PYTHON_COMPAT. The assumption is
that the ebuilds are intended to be used within multiple contexts
which can involve revisions of this eclass that support different
Python implementations.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow two special values in the implementation patterns for
_python_impl_matches(): -2 to indicate all Python 2-compatible
implementations, and -3 to indicate all Python 3-compatible
implementations. Both of those values are implemented using
the python_is_python3 function.
This is mostly meant to make it easier and more fool-proof to write
dependencies on backports to Python 2 which in most cases apply to PyPy2
as well.
|
|
|
|
|
|
| |
Introduce a _python_impl_matches() function that commonizes the pattern
matching behavior used throughout python-r1 & python-single-r1. Having
a single implementation makes future extensions much easier.
|
|
|
|
|
|
|
| |
Allow specifying the relative package destination using the dot-notation
used by Python itself (e.g. 'foo.bar') in addition to the directory form
('foo/bar'). Since dot can not be used in Python package names, this
change is backwards-compatible.
|