summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* python-r1.eclass: Set @PROVIDESMichał Górny2021-09-021-0/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-r1.eclass: Enable EAPI 8Michał Górny2021-06-231-2/+2
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-r1.eclass: Use 'dosym -r' in EAPI 8Michał Górny2021-06-231-1/+3
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-r1.eclass: Ban python_gen_usedep in EAPI 8Michał Górny2021-06-231-0/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-r1.eclass: Remove obsolete QA hack for PYTHON_USEDEPMichał Górny2021-06-231-14/+4
| | | | | | | | | 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>
* python-r1.eclass: Update doc for -2/-3 arg removalMichał Górny2021-06-231-35/+28
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-r1.eclass: Remove support for EAPIs prior to 6Michał Górny2021-04-091-5/+3
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-r1.eclass: Update examples to use BDEPENDMichał Górny2021-03-281-6/+6
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-r1.eclass: Fix any-r1-style python_setup without USE flagsMichał Górny2021-03-111-5/+8
| | | | | | | 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>
* python-r1.eclass: Allow empty depstring to python_gen_any_depMichał Górny2021-02-111-7/+8
| | | | | | | | | 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>
* python-r1.eclass: Support PYTHON_SINGLE_USEDEP in any-dep APIMichał Górny2020-12-231-7/+33
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-r1.eclass: Update PYTHON_USEDEP in python_gen_any_dep()Michał Górny2020-12-231-10/+10
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python*-r1.eclass: Check for invalid impl patternsMichał Górny2020-08-071-0/+6
| | | | | | | | | | | | | 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>
* python-r1.eclass: Fix eclassdocMichał Górny2020-07-041-2/+8
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Mark python_export privateMichał Górny2020-03-221-6/+6
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Make python_wrapper_setup privateMichał Górny2020-03-221-2/+2
| | | | | | | | 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>
* python-r1.eclass: Report impl used by python_setupMichał Górny2020-03-051-0/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python*-r1.eclass, distutils-r1.eclass: Link to Python GuideMichał Górny2020-03-051-3/+3
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python*-r1.eclass: Update examples for virtual/pypy removalMichał Górny2019-12-301-1/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python*r1.eclass: Remove python-exec:0 leftoverMichał Górny2019-12-071-5/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python*r1.eclass: Reliably allow empty <pattern>s to gen funcsMichał Górny2019-12-071-7/+6
| | | | | | | | | 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>
* python*-r1.eclass: Deprecate python_gen_usedepMichał Górny2019-12-071-16/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* python-r1.eclass: Remove python_export_bestMichał Górny2019-11-291-30/+0
| | | | | | 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>
* python-r1.eclass: Fix stripping :0= from PyPy w/ REQ_USE setMichał Górny2019-11-191-1/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-r1.eclass: add @SUPPORTED_EAPISMichał Górny2018-08-151-0/+1
|
* python-r1.eclass: Sanitize exeoptsMichał Górny2018-06-131-0/+1
| | | | | Sanitize exeopts when calling doexe, in order to avoid prior insopts calls accidentally affecting do*/new* functions defined by the eclass.
* python-r1.eclass: Enable EAPI 7 (no changes)Michał Górny2018-05-071-2/+2
|
* python-r1.eclass: Add python_gen_any_dep, to create any-of depsMichał Górny2017-05-291-0/+98
| | | | | | 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.
* python-r1.eclass: Support python_check_deps() in python_setupMichał Górny2017-05-291-10/+38
| | | | | | | | | | | | | | | | | 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.
* python-r1.eclass: Inline implementation loop logic into python_setupMichał Górny2017-05-291-9/+26
| | | | | | | | | | | | 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().
* python-r1.eclass: Move PYTHON_COMPAT_OVERRIDE warning into flag checkMichał Górny2017-05-291-13/+18
| | | | | | | | 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.
* python-r1.eclass: Remove deprecated python_parallel_foreach_implMichał Górny2017-05-291-35/+0
| | | | | The function was (verbosely) deprecated in Dec 2014, and banned since EAPI 6. It is no longer used by any ebuild in ::gentoo.
* python-r1.eclass: python_setup, add REQUIRED_USE to the exampleMichał Górny2017-05-291-0/+1
|
* python-r1.eclass: fix python_setupMike Gilbert2017-05-181-1/+1
| | | | A non-existant "impl" variable was being passed to _python_impl_matches.
* python-r1.eclass: Document new pattern supportMichał Górny2017-05-161-2/+29
|
* python-r1.eclass: python_setup, use _python_impl_matches()Michał Górny2017-05-161-6/+3
|
* python-r1.eclass: python_gen_impl_dep, use _python_impl_matches()Michał Górny2017-05-161-11/+6
|
* python-r1.eclass: python_gen_cond_dep, use _python_impl_matches()Michał Górny2017-05-161-16/+11
|
* python-r1.eclass: python_gen_useflags, use _python_impl_matches()Michał Górny2017-05-161-8/+4
|
* python-r1.eclass: python_gen_usedep, use _python_impl_matches()Michał Górny2017-05-161-11/+7
|
* python-r1.eclass: Add integrity checks for globalsMichał Górny2017-03-081-5/+37
|
* python-r1.eclass: Refactor globals to use local vars, NFCMichał Górny2017-03-081-8/+10
|
* python-r1.eclass: Remove stale EAPI=4 branch in globalsMichał Górny2017-03-081-6/+2
|
* python-r1.eclass: localize variable to avoid leaking into the envTim Harder2017-03-081-0/+1
|
* Drop $Id$ per council decision in bug #611234.Robin H. Johnson2017-02-281-1/+0
| | | | Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
* python-r1.eclass: Wipe obsolete EAPI=4 exceptionsMichał Górny2017-02-171-15/+1
|
* python-r1.eclass: drop stray '}' in example docstringSergei Trofimovich2016-11-051-1/+1
|
* python-r1.eclass: Introduce python_gen_impl_depMichał Górny2015-12-311-0/+52
| | | | | | | | 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.
* python-r1.eclass: _python_obtain_impls: handle local PYTHON_COMPATZac Medico2015-12-221-0/+1
| | | | | | See local PYTHON_COMPAT setting in _distutils-r1_run_common_phase. Fixes: 33380ad5e121 ("python*-r1.eclass: Commonize PYTHON_COMPAT processing, cache the result")
* python*-r1.eclass: Commonize PYTHON_COMPAT processing, cache the resultMichał Górny2015-12-221-36/+11
| | | | | | | | | 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.