summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* python-r1.eclass: localise 'i' in python_setupSam James2022-08-241-1/+1
| | | | | Reported-by: Kerin Millar <kfm@plushkava.net> Signed-off-by: Sam James <sam@gentoo.org>
* python*-r1.eclass: Add missing inherit for eqawarnUlrich Müller2022-07-241-0/+1
| | | | Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* python-r1.eclass: Warn about direct foreach_impl calls in d-r1Michał Górny2022-06-121-0/+18
| | | | | | | Warn if python_foreach_impl is called directly from within a phase function that is already covered by a distutils-r1 sub-phase. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* *.eclass: @ECLASS-VARIABLE renamed to @ECLASS_VARIABLEUlrich Müller2022-03-241-8/+8
| | | | | Bug: https://bugs.gentoo.org/835396 Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* python-utils-r1.eclass: Support matching impls by stdlib versionMichał Górny2022-02-091-25/+10
| | | | | | | | | | | | | | 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>
* python-r1.eclass: Improve comment for USE-dep generationMichał Górny2022-02-091-3/+9
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Add function to run python_check_deps()Michał Górny2022-02-091-6/+1
| | | | | | | 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>
* python-r1.eclass: Remove deprecated python_gen_usedepMichał Górny2022-02-091-42/+1
| | | | | | | This function is deprecated for some time already and there are no more consumers left in ::gentoo. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass: Update links to Gentoo Python GuideMichał Górny2022-01-291-1/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python*-r1.eclass: Remove explicit dep on python-execMichał Górny2022-01-091-8/+1
| | | | | | | | The dev-lang/python-exec dependency is now enforced through dev-lang/python, remove the explicit dep to reduce the metadata size and make dependency resolution lighter. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* 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
|