| 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: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Remove the QA hack for PYTHON_USEDEP that originally prevented python-r1
ebuilds from wrongly depending on python-single-r1 packages. Since
the latter no longer define python_targets*, these dependencies are now
caught without any hacks.
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>
|
|
|
|
|
|
|
| |
Fix python_setup() not to fail if no USE flags are set while any-r1 API
is being used. Reported by Arfrever.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
|
|
|
|
|
| |
Allow python_gen_any_dep to accept an empty/missing depstring, in order
to generate a pure dependency on the Python interpreter. This is
a valid use case for it since python-r1 does not provide any-r1 style
PYTHON_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>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Deprecate python_gen_usedep() in favor of python_gen_cond_dep().
The latter is a newer API that generates full USE-conditional blocks
rather than pure USE-dependency strings. As such, it can replace all
uses of the former, and is safer to use in general. In particular:
dev-python/foo[$(python_gen_usedep -2)]
dev-python/bar[$(python_gen_usedep -2)]
installs the dependency (with no implementation match enforced) even
if there's no python2 implementation enabled, while:
$(python_gen_cond_dep '
dev-python/foo[${PYTHON_USEDEP}]
dev-python/bar[${PYTHON_USEDEP}]
' -2)
installs it only if there's at least one implementation requiring it.
Since the functions are used in global scope only, a deprecation warning
is emitted only once, during the sourcing for pkg_setup phase. This
avoids having it output during metadata cache regeneration.
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/13785
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
|
|
|
| |
Signed-off-by: Michał Górny <mgorny@gentoo.org>
|
| |
|
|
|
|
|
| |
Sanitize exeopts when calling doexe, in order to avoid prior insopts
calls accidentally affecting do*/new* functions defined by the eclass.
|
| |
|
|
|
|
|
|
| |
Add a python_gen_any_dep() function similar to the one in python-any-r1
to facilitate creating any-of dependencies for the new python_setup
syntax.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Provide an alternate mode for python_setup() that behaves similarly to
python-any-r1 eclass. If python_check_deps() function is declared
by the ebuild, the python_setup logic switches to accepting any
implementation that is in PYTHON_COMPAT, installed and satisfies
python_check_deps() independently of USE flags.
This new logic makes it possible to replace some of the existing
REQUIRED_USE constraints for build-time dependencies with more friendly
any-of dependencies. For example, if a package supports both Python 2 &
Python 3 but has a purely Python 2 build-time dependency (e.g. for
building documentation) we had to force Python 2 being enabled via
REQUIRED_USE. Using python_check_deps() with appropriate any-of
dependency, we can use Python 2 for this task without actually forcing
the user to change USE flags or install the package for Python 2.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Inline the logic needed to iterate over implementations directly into
python_setup instead of using python_foreach_impl. This is mostly NFC,
except that we iterate in reverse order now -- that is, we start at
the newest implementation and stop at the first one that works for us.
Previously we (implicitly) started at the oldest implementation, checked
all implementation and used the last one (i.e. the newest) that worked.
More importantly, the new code makes it possible to alter the logic more
easily and avoid relying on implementation of python_foreach_impl().
|
|
|
|
|
|
|
|
| |
Move the PYTHON_COMPAT_OVERRIDE warning from _python_obtain_impls()
to _python_validate_useflags(). Since the latter function is the only
point where the former is called, this is a purely cosmetic change at
the moment. However, it makes it possible to reuse the warning in
additional places without the necessity of setting MULTIBUILD_VARIANTS.
|
|
|
|
|
| |
The function was (verbosely) deprecated in Dec 2014, and banned since
EAPI 6. It is no longer used by any ebuild in ::gentoo.
|
| |
|
|
|
|
| |
A non-existant "impl" variable was being passed to _python_impl_matches.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Add a python_gen_impl_dep() that serves the purpose of generating custom
dependencies on the Python interpreter (like PYTHON_DEPS). The function
provides ability to request dependencies with another USE dependency
string (different than global PYTHON_REQ_USE) and limit the dependencies
to subset of supported implementations.
|
|
|
|
|
|
| |
See local PYTHON_COMPAT setting in _distutils-r1_run_common_phase.
Fixes: 33380ad5e121 ("python*-r1.eclass: Commonize PYTHON_COMPAT processing, cache the result")
|
|
|
|
|
|
|
|
|
| |
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.
|