summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* python-utils-r1.eclass: Pass -Wdefault to epytest to avoid -WerrorMichał Górny2021-07-021-0/+3
| | | | | | | | | | | | | | | Make pytest pass -Wdefault in order to override upstream default warning options that commonly include -Werror. This has often caused tests to start failing due to new deprecation warnings introduced in dependencies, or block new implementations due to harmless deprecation warnings. A side effect of this is that we are overriding all warning options used by upstream. This could e.g. cause more warnings to be reported (when upstream ignores some of them). This might also break badly written tests (e.g. when they rely on exceptions to catch warnings). Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Remove _python_ln_relMichał Górny2021-06-291-40/+0
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* Revert "python-utils-r1.eclass: Remove _python_ln_rel"Mike Gilbert2021-06-241-0/+40
| | | | | Reverts: 1f678a8cae66480493c43739435ec7feb85c08da Signed-off-by: Mike Gilbert <floppym@gentoo.org>
* python-utils-r1.eclass: Revert "Remove python_optimize support..."Michał Górny2021-06-241-2/+6
| | | | | | | | python_optimize is still used in dev-python/pypy. Reverts: 964f5c61816659b0138c8fe98593786d9da7f084 Closes: https://bugs.gentoo.org/798330 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Remove _python_ln_relMichał Górny2021-06-231-40/+0
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Enable EAPI 8Michał Górny2021-06-231-2/+2
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Fix python_fix_shebang for py3.10+Michał Górny2021-06-231-5/+7
| | | | | | We should be safe until Python 3.99 now ;-). Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Deprecated and EAPI8-ban python_is_python3Michał Górny2021-06-231-0/+3
| | | | | | | There is no use for python_is_python3 anymore, as Python 2 is no longer supported at runtime and the remaining any-r1 uses are pure-2. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Ban py2 deps in python_gen* in EAPI 8Michał Górny2021-06-231-13/+26
| | | | | | | | Ban using -2 or python2* as an argument to python_gen_cond_dep and other functions using _python_impl_matches, in order to force cleaning up old entries, in EAPI 8. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Eliminate local python_is_python3 usesMichał Górny2021-06-231-10/+6
| | | | | | | | Do not use python_is_python3 in eclass functions to ease banning it. Except for wrapper setup that is still used in py2 any-r1 context, we can unconditionally assume Python 3 everywhere. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Rename *into vars to use underscoresMichał Górny2021-06-231-6/+6
| | | | | | | | Rename helper variables used by *into to mark them private with underscores. The old names are leftovers from deprecated API that permitted setting them directly. It was last used in ::gentoo in 2016. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Remove python_optimize support for py<3.5Michał Górny2021-06-231-6/+2
| | | | | | | | Remove the support code for Python 2.7, <3.5, as well as PyPy2.7. These are no longer supported at runtime, so byte-compiling should not be used for these impls. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Use 'dosym -r' in EAPI 8Michał Górny2021-06-231-2/+4
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Ban private API in EAPI 8Michał Górny2021-06-231-0/+4
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Disable python3_7Michał Górny2021-06-011-2/+2
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Grab paths from sysconfig moduleMichał Górny2021-05-121-5/+2
| | | | | | | | | Grab site-packages and includedir paths from sysconfig rather than distutils.sysconfig, as the latter module is deprecated. The new method results in the same paths for all supported implementations, as confirmed by the tests. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Add py3.10 to patternsMichał Górny2021-05-041-1/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Enable python3_10Michał Górny2021-05-041-1/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: add note when dropping EAPI supportSam James2021-04-101-0/+3
| | | | | | | | | | | | | We need to remember to update metadata/install-qa-check.d/60python-pyc in future to disable now non-applicable QA checks. If we don't, we end up breaking older EAPI installs in general. See: 1137a7ecce67c48fc9a69ab320c6156c40366122 See: bdcfb21ca5a84567e9c9d6a456374a05e798f78e Bug: https://bugs.gentoo.org/704286 Bug: https://bugs.gentoo.org/781878 Signed-off-by: Sam James <sam@gentoo.org>
* python-utils-r1.eclass: Remove support for EAPIs prior to 6Michał Górny2021-04-091-33/+13
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Include -l in epytestMichał Górny2021-04-091-1/+10
| | | | | | | Add '-l' to epytest, in order to improve tracebacks by including the values of local variables. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Add eunittest helperMichał Górny2021-03-281-0/+23
| | | | | | | | | | | Add an eunittest helper to wrap up the common 'python -m unittest discover' calls, except that they are run via dev-python/unittest-or-fail now. This guarantees that if no tests are discovered the test phase fails rather than silently ignoring the problem. This is especially helpful since it saves the developer from having to inspect test phase logs. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Remove python.eclass guardsMichał Górny2021-03-111-170/+0
| | | | | | | python.eclass is gone for a long time, ::progress is discontinued, it should be safe to assume people will no longer be copying old stuff. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Always force test summary in epytestMichał Górny2021-03-081-1/+1
| | | | | | | | Explicitly request pytest to display the summary of all test results except for passing tests. This overrides the upstream defaults to improve the quality of build logs. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Introduce epytest helperMichał Górny2021-03-081-0/+23
| | | | | | | | | | | | Introduce an epytest helper to call pytest with the standard set of options, and the standard error message. While distutils_enable_tests made running pytest a lot easier, there are still many cases when python_test() needs to be redefined in order to pass additional options or perform additional actions. Having the extra helper will reduce code duplication and make it easier to change the standard options. 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-3/+8
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Disable python3_6Michał Górny2021-01-151-3/+3
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Inline _python_impl_supported()Michał Górny2021-01-151-36/+20
| | | | | | | | | | | | The _python_impl_supported() function is not used anymore in its original function. It is called only once, in order to die on incorrect targets in PYTHON_COMPAT. Let's inline the corresponding logic in _python_set_impls() and remove the function. While at it, add an extra check for outdated patterns. This also renders the relevant tests obsolete. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Make python_optimize fail if -x $PYTHONMichał Górny2020-09-171-0/+1
| | | | | | | | | | | Make python_optimize() fail if the expected Python interpreter is not executable. Since some errors are expected during Python byte-compilation (e.g. CPython includes test .py modules with syntax errors), we can't rely on compileall result. However, this will catch at least the very bad mistake of wrong ${PYTHON} that affects e.g. dev-python/pypy*. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python*-r1.eclass: Check for invalid impl patternsMichał Górny2020-08-071-0/+34
| | | | | | | | | | | | | 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-utils-r1.eclass: Fix eclassdoc tag orderMichał Górny2020-07-041-1/+1
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Enable python3_9Michał Górny2020-05-251-2/+2
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Restore old CPython version reqsMichał Górny2020-04-301-7/+5
| | | | | Closes: https://bugs.gentoo.org/720048 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Fix PYTHON_LIBS for py3.8+Michał Górny2020-04-191-2/+6
| | | | | | | | | | | Python 3.8+ provides two pkg-config files: python-3.8 for building Python extensions and python-3.8-embed for embedding Python in other programs. The former no longer lists -lpython*, resulting in empty PYTHON_LIBS. Since our consumers are more likely to want it non-empty if they already query it, switch to the latter file. Closes: https://bugs.gentoo.org/718344 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Bump python:3.7 depMichał Górny2020-04-141-1/+1
| | | | | | Hopefully it resolves package issues that were caused by 3.7.6. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Bump minimal Python versionsMichał Górny2020-03-271-10/+8
| | | | | | | | | Bump minimal Python versions to current stable to save ebuilds from having to hack around the dependencies. Signed-off-by: Michał Górny <mgorny@gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/15135 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Mark python_export privateMichał Górny2020-03-221-124/+26
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Replace python_export with gettersMichał Górny2020-03-221-11/+6
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Make python_wrapper_setup privateMichał Górny2020-03-221-1/+16
| | | | | | | | 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-utils-r1.eclass: Create python3-embed.pc wrapperMichał Górny2020-03-161-1/+7
| | | | | Closes: https://bugs.gentoo.org/712526 Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Do not create 'python.pc' wrapperMichał Górny2020-03-161-3/+2
| | | | | | | Do not create 'python.pc', only 'python[23].pc'. This seems to match what other distributions are doing. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Remove leftover from virtual/pypy*Michał Górny2020-03-051-17/+3
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Update docs to use python_setupMichał Górny2020-03-051-2/+2
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Mark _python_check_locale_sanity @INTERNALMichał 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-utils-r1.eclass: Eliminate virtual/pypyMichał Górny2019-12-301-2/+2
| | | | | | | Depend on dev-python/pypy directly, as that's the common package with the new layout. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Remove PYTHON_TARGETS="jython2_7"Michał Górny2019-12-301-3/+2
| | | | | | | | | Jython was supported as an experimental implementation but due to interoperability issues and very slow development, its (re-)deployment in ebuilds never took off. Now that Python 2.7 is going away, there's no point in keeping its future support. Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Remove PYTHON_TARGETS="pypy"David Seifert2019-12-301-3/+3
| | | | | | | | | | * With the EOL of CPython 2, we also want to remove support for PyPy (i.e. PyPy for Python 2). This change does not affect PyPy3, i.e. Pypy for Python 3. Signed-off-by: David Seifert <soap@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Remove PYTHON_TARGETS="python3_5"David Seifert2019-12-301-3/+3
| | | | | | | | | | | * Python 3.5 will go EOL on 2020-09-13 and in order to reduce testing and maintenance burden, we want to keep the number of active Py3 impls below four. https://devguide.python.org/#status-of-python-branches Signed-off-by: David Seifert <soap@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Constrain to EAPI >= 5David Seifert2019-12-301-28/+9
| | | | | Signed-off-by: David Seifert <soap@gentoo.org> Signed-off-by: Michał Górny <mgorny@gentoo.org>