| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
Clearly indicate that python_moduleinto can be safely called outside
of the environment with Python interpreter established, and that
a single call can set the correct relative path for multiple different
implementations.
|
|
|
|
|
| |
Remove the bit of old python_moduleinto documentation that has been
accidentally left over.
|
|
|
|
|
| |
Enable the three-level optimization logic for pypy3, to account for
pypy3-5.7 being based on CPython 3.5 and using all three suffixes.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Use plain 'pythonX.Y-config' executable name in the python-config
wrapper instead of querying the complete PYTHON_CONFIG path from
python_export.
Constructing full PYTHON_CONFIG path requires querying ABIFLAGS which
requires the Python interpreter to be installed, which in turn
unnecessarily forces every ebuild using the eclass to carry a build-time
dependency on the Python interpreter.
All current versions of Python correctly install 'pythonX.Y-config'
symlink that points to the correct ABI-suffixed binary. It is therefore
unnecessary to use the full path.
|
|
|
|
| |
Signed-off-by: Justin Lecher <jlec@gentoo.org>
|
|
|
|
|
|
|
| |
Add integrity check for multi-inherits, i.e. ensure that PYTHON_COMPAT
has not changed between successive calls to _python_set_impls. If it did
(e.g. because of eclass+ebuild setting different values), then we abort
not to give surprising results to the user.
|
|
|
|
|
|
| |
Refactor _python_set_impls to use local variables throughout
the function and assign global values at the end. This prepares it for
double-inherit integrity checks. NFC.
|
|
|
|
|
|
|
|
| |
Fix python_wrapper_setup function to move setting environment variables
for PATH and PKG_CONFIG_PATH outside the 'if'. Otherwise, they are only
set on the initial invocation of python_wrapper_setup for the particular
impl and do not apply to subsequent invocations (e.g. further
distutils-r1 phases).
|
|
|
|
| |
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
|
|
|
|
|
| |
Bump the dependency on PyPy to require relatively recent versions, to
ease package maintenance.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
Remove python_scriptroot & python_moduleroot from the public eclass API,
in favor of calls to python_scriptinto and python_moduleinto. This
feature was seldom used, not listed in the official API guide,
and the *into functions is more in line with the PMS.
|
|
|
|
|
|
|
|
|
|
| |
Replace the code respecting current value of ${DESTTREE} in favor of
using /usr unconditionally. The feature was extremely unlikely to be
ever used (only if you did 'into ...; python_do*', quite confusing
and relied on semi-internal package manager variables.
Furthermore, it was potentially broken as it relied on DESTTREE having
an initial '/usr' value which is not warranted by the PMS.
|
|
|
|
|
|
|
|
|
|
|
| |
Fix _PYTHON_ALL_IMPLS to list Jython & PyPy before CPython versions,
therefore causing them not to be implicitly preferred over CPython.
The implementation reordering done in b284e54 ("reorder implementations
in semi-ascending order") has caused PyPy & Jython to be listed after
CPython. While seemingly it was more intuitive to list third-party
implementations after the reference one, it also implicitly caused them
to be preferred by python-exec.
|
|
|
|
|
|
|
|
|
| |
Introduce a common _python_set_impls function in python-utils-r1.eclass
that validates and processes PYTHON_COMPAT, then stores the result in
_PYTHON_SUPPORTED_IMPLS and _PYTHON_UNSUPPORTED_IMPLS variables. Reuse
those variables in all python-r1 suite eclasses, effectively reducing
code duplication and providing cache for repeated implementation support
checks.
|
|
|
|
|
|
| |
Replace uses of 'declare -g -r' (bash-4.2+) with 'readonly'. Reported
by Arfrever. This time use split assignments followed by readonly calls
since combined calls work unreliably.
|
|
|
|
|
|
| |
This reverts commit 44d3345d828af162b2fbfd623dd8f0d7ac4ae2f9.
This was triggering "No supported implementation in PYTHON_COMPAT.".
|
|
|
|
|
| |
Replace uses of 'declare -g -r' (bash-4.2+) with 'readonly'. Reported
by Arfrever.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Reorder the Python implementations to ascending version order, with
CPython listed first and other implementations in descending preference.
The previous ordering has been used for two reasons:
1. There were packages which supported Python 3.x or PyPy partially but
their documentation builds or test functions required CPython 2.x.
The specific ordering caused python_export_best (the predecessor of
python_setup) to use CPython 2.x for those tasks. This is now replaced
by explicit implementation restrictions in python_setup.
2. PyPy setup runs were usually slower than CPython, and CPython 3.x
runs were often slower due to 2to3 calls. Combined with parallel build
runs, this ordering caused slower builds to start earlier and sometimes
resulted in more efficient use of threads. However, nowadays we no
longer do parallel builds.
Therefore, it seems reasonable to finally reorder the implementations
into a more intuitive order.
|
| |
|
|
|
|
|
|
| |
Paludis sets LC_ALL=C to ensure a 'sane' build environment.
We only want to override LC_CTYPE, so we break LC_ALL into separate
LC_* overrides and set LC_ALL to blank.
|
| |
|
|
|
|
|
|
| |
Fix python_do* and python_new* helper ban to EAPIs older than 4. That
was the original intent, and restricting it to 5+ breaks old
dev-lang/python ebuilds.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Ban python_do* and python_new* helpers in EAPIs older than 5. We should
ban them in python-any-r1 uses, actually but that would break
dev-python/pypy* ebuilds as they are written now.
|
|
|
|
|
| |
Replace the 'local INSDESTTREE' hacks (which are PMS-valid yet
deprecated) with safer subshells.
|
| |
|
|
|
|
|
|
|
| |
Add '-H' option to find to allow following symlinks passed as
parameters. This makes python_fix_shebang handle either file symlinks
passed directly, or directory symlinks passed directly for recursive
traversal. Both were currently ignored silently.
|