summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* python{,-any}-r1.eclass: use python_has_version in examplesMatt Whitlock2023-08-191-3/+3
| | | | | | | | | | | | | | | | | | The python_check_deps() examples given in the documentation of several functions and variables in python-r1.eclass and python-any-r1.eclass are incorrect. The default behavior of has_version() is to check the *runtime* system (RDEPEND), but python_check_deps() is meant to check that the *build* system (BDEPEND) has a suitable Python environment. The examples fail to do this and thus likely are leading developers to write incorrect python_check_deps() functions in their ebuilds. Thankfully, python-utils-r1.eclass supplies a python_has_version() function that defaults to checking the build system and implements some other enhancements that make it nicer for use in python_check_deps(). Change the examples to use python_has_version. Closes: https://bugs.gentoo.org/835462 Signed-off-by: Matt Whitlock <gentoo@mattwhitlock.name> Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Loosen minimal Python versionsMichał Górny2023-07-171-3/+3
| | | | | | | | | | | | | | | | | | Loosen minimal Python versions to accept any version in a given slot. Lower bounds are cumbersome to maintain and cause problems when upgrading outdated systems, particularly when sys-libs/glibc is involved. We could technically apply some hack to make any-r1 dependency checks to conditionally ignore minimal versions but that sounds like unnecessary complexity. In the end, minimum versions were primarily enforced to make sure users got the latest bugfixes but that doesn't seem strictly necessary. Closes: https://bugs.gentoo.org/910288 Signed-off-by: Michał Górny <mgorny@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/31796 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-single-r1.eclass: drop EAPI 6 supportDavid Seifert2022-12-271-1/+1
| | | | Signed-off-by: David Seifert <soap@gentoo.org>
* python-r1.eclass: drop EAPI 6 supportDavid Seifert2022-12-271-1/+1
| | | | Signed-off-by: David Seifert <soap@gentoo.org>
* python-any-r1.eclass: drop EAPI 6 supportDavid Seifert2022-12-271-13/+8
| | | | Signed-off-by: David Seifert <soap@gentoo.org>
* python-any-r1.eclass: Stop allowing python2_7Michał Górny2022-12-141-1/+0
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-any-r1.eclass: localise 'i' in python_setupSam James2022-08-241-0/+1
| | | | | Reported-by: Kerin Millar <kfm@plushkava.net> Signed-off-by: Sam James <sam@gentoo.org>
* python-any-r1.eclass: use python_has_version in examplesArthur Zamarin2022-06-071-5/+5
| | | | | | | python_has_version is preferred as it gives nicer output and safer defaults, instead of has_version. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* *.eclass: @ECLASS-VARIABLE renamed to @ECLASS_VARIABLEUlrich Müller2022-03-241-6/+6
| | | | | Bug: https://bugs.gentoo.org/835396 Signed-off-by: Ulrich Müller <ulm@gentoo.org>
* python-any-r1.eclass: Fix unsupported/invalid EPYTHON logicMichał Górny2022-02-251-3/+5
| | | | | | | | | | | Fix the unsupported/invalid EPYTHON logic to make more sense. As a result of prior refactoring, the eclass would report all invalid EPYTHON values as unsupported and the invalid branch would never be reached -- except for the special case of python2_7 where it would incorrectly reject it. Fix it, so that unsupported EPYTHON values are reported either as "just unsupported" or incorrect values correctly. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-any-r1.eclass: Do not test EPYTHON twiceMichał Górny2022-02-091-6/+8
| | | | | | | | Avoid checking the implementation from EPYTHON via fallback iteration. While there's no technical harm in doing that, now that we output verbosely the users will notice ;-). Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-any-r1.eclass: Explain the reason for interpreter choiceMichał Górny2022-02-091-3/+3
| | | | 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-28/+4
| | | | | | | 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-any-r1.eclass: Move EPYTHON validity check to python_setup()Michał Górny2022-02-091-22/+14
| | | | | | | | | Move the EPYTHON validity check from _python_EPYTHON_supported() to python_setup() where it belongs. This avoids unnecessarily retesting implementations taken from PYTHON_COMPAT and paves the way towards moving the common logic to python-utils-r1. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* eclass: Update links to Gentoo Python GuideMichał Górny2022-01-291-2/+2
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-any-r1.eclass: Set @PROVIDESMichał Górny2021-09-021-0/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-any-r1.eclass: Enable EAPI 8Michał Górny2021-06-231-2/+2
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-any-r1.eclass: Remove obsolete PYTHON_USEDEP single-r1 hackMichał Górny2021-06-231-7/+7
| | | | | | | | | 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-any-r1.eclass: Remove obsolete eselect-python useMichał Górny2021-06-231-16/+0
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-any-r1.eclass: Remove support for EAPIs prior to 6Michał Górny2021-04-091-3/+3
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-any-r1.eclass: Use BDEPEND in examplesMichał Górny2021-03-281-4/+3
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Disable py2.7, except for p-any-r1Michał Górny2021-01-311-0/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-any-r1.eclass: Support PYTHON_SINGLE_USEDEPMichał Górny2020-12-231-10/+38
| | | | | Closes: https://bugs.gentoo.org/713894 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-any-r1.eclass: Update PYTHON_USEDEP to match python-r1Michał Górny2020-12-231-15/+14
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-any-r1.eclass: Mark variable classes in eclassdocMichał Górny2020-07-041-1/+4
| | | | 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-4/+4
| | | | | | | | 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-any-r1.eclass: Report impl used by python_setupMichał Górny2020-03-051-0/+4
| | | | 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-any-r1.eclass: Constrain to EAPI >= 5David Seifert2019-12-301-6/+4
| | | | | Signed-off-by: David Seifert <soap@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-any-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-any-r1.eclass: Declare PYTHON_REQUIRED_USE to catch errorsMichał Górny2019-07-221-1/+7
| | | | | Closes: https://github.com/gentoo/gentoo/pull/12492 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-any-r1.eclass: add @SUPPORTED_EAPISMichał Górny2018-08-151-0/+1
|
* python-any-r1.eclass: Enable EAPI 7 (no changes)Michał Górny2018-05-071-2/+2
|
* python-any-r1.eclass: python_gen_any_dep, add missing 'local i'Michał Górny2017-05-291-1/+1
|
* python-any-r1.eclass: Add integrity check for globalsMichał Górny2017-03-081-4/+13
|
* python-any-r1.eclass: Global setter, refactor for more local varsMichał Górny2017-03-081-5/+6
| | | | | | Refactor _python_any_set_globals() to use local variables while generating all output, and copy it to final vars at the end. This is in preparation for integrity checks. NFC.
* python-any-r1.eclass: Move PYTHON_USEDEP doc before globalsMichał Górny2017-03-011-19/+19
|
* 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-any-r1.eclass: Ensure not to emit := in || () depsMichał Górny2016-06-121-2/+4
|
* python-any-r1.eclass: Use reverse iter instead of reversing impls arrayMichał Górny2015-12-221-7/+3
|
* python-any-r1.eclass: Support PYTHON_COMPAT_OVERRIDEMichał Górny2015-12-221-0/+35
|
* python*-r1.eclass: Commonize PYTHON_COMPAT processing, cache the resultMichał Górny2015-12-221-22/+6
| | | | | | | | | 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.
* python*-r1.eclass: Replace non-portable use of 'declare -g'Michał Górny2015-12-111-1/+2
| | | | | | 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.
* Revert "python*-r1.eclass: Replace non-portable use of 'declare -g'"Mike Gilbert2015-12-111-1/+1
| | | | | | This reverts commit 44d3345d828af162b2fbfd623dd8f0d7ac4ae2f9. This was triggering "No supported implementation in PYTHON_COMPAT.".
* python*-r1.eclass: Replace non-portable use of 'declare -g'Michał Górny2015-12-111-1/+1
| | | | | Replace uses of 'declare -g -r' (bash-4.2+) with 'readonly'. Reported by Arfrever.
* python-any-r1.eclass: Mark eclass-generated variables read-onlyMichał Górny2015-12-091-1/+1
|
* python-any-r1.eclass: Unset global-setting function after useMichał Górny2015-12-091-0/+1
|
* python-any-r1.eclass: Rename global-setting func to match eclass nameMichał Górny2015-12-091-2/+2
|
* python-any-r1.eclass: Enable EAPI=6, no changes neededMichał Górny2015-11-281-2/+1
|