summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* python-utils-r1.eclass: Disable python3_4Michał Górny2019-03-211-3/+3
| | | | Signed-off-by: Michał Górny <mgorny@gentoo.org>
* python-utils-r1.eclass: Revert "Block also pythonX.Y in wrappers"Michał Górny2018-09-181-11/+1
| | | | | | | This turned out to be overzealous and broke calling external programs that were using different Python version. Reverts: 7f291f5759959bc338ca0b52b169871f0dccf9a9
* python-utils-r1.eclass: Block also pythonX.Y in wrappersMichał Górny2018-09-181-1/+11
| | | | | | | | | | | | Improve the wrapper blocking logic to block specific Python versions as well rather than just 2/3. In other words, for eselected pythonX.Y both pythonZ (Z = X^1) and python*.* (!= X.Y) will be blocked. Hopefully this will catch more build systems that hardcode Python versions rather than respecting what we're giving them. This will work only for build systems respecting PATH. Build systems (and ebuilds) using /usr/bin path directly will still be able to use other Python versions.
* python-utils-r1.eclass: add @SUPPORTED_EAPISMichał Górny2018-08-151-0/+1
|
* python-utils-r1.eclass: add python3_7 supportMike Gilbert2018-07-081-2/+2
|
* python-utils-r1.eclass: Sanitize insopts/exeoptsMichał Górny2018-06-131-0/+3
| | | | | | Sanitize insopts/exeopts when calling doins/doexe, in order to avoid prior insopts calls accidentally affecting do*/new* functions defined by the eclass.
* python-utils-r1.eclass: Initial EAPI 7 supportMichał Górny2018-05-071-16/+27
| | | | | | | | | Add initial EAPI 7 support. Handle trailing slash in D/ED correctly. Support new has_version switches. This does not provide proper cross support. In particular, the PYTHON variable (full path to the interpreter) is used both in contexts of BDEPEND and DEPEND, so we need to clean the uses first.
* python-utils-r1.eclass: _python_impl_matches, handle both forms of implMichał Górny2017-05-291-2/+4
| | | | | | | | | Make the pattern matching code in _python_impl_matches() more lax, allowing (accidental) mixing of PYTHON_COMPAT-style values with EPYTHON-style values. This is trivial to do, and solves the problem introduced by complexity-by-limitation of other eclasses -- where patterns for dependency strings are using PYTHON_COMPAT syntax, and patterns for python_setup are using EPYTHON syntax.
* python-utils-r1.eclass: add more info to stub python wrappersMike Frysinger2017-05-161-1/+1
| | | | | The short terse error messages here are not easy to track down. Add a few more details so people can figure out what's going wrong faster.
* python-utils-r1.eclass: support PYTHON_COMPAT_NO_STRICT variableZac Medico2017-05-161-0/+13
| | | | | | | | This is intended to be set by the user when using ebuilds that may have unknown implementations in PYTHON_COMPAT. The assumption is that the ebuilds are intended to be used within multiple contexts which can involve revisions of this eclass that support different Python implementations.
* python-utils-r1.eclass: Allow -2/-3 as impl-patterns for py2/py3Michał Górny2017-05-161-3/+11
| | | | | | | | | | | | Allow two special values in the implementation patterns for _python_impl_matches(): -2 to indicate all Python 2-compatible implementations, and -3 to indicate all Python 3-compatible implementations. Both of those values are implemented using the python_is_python3 function. This is mostly meant to make it easier and more fool-proof to write dependencies on backports to Python 2 which in most cases apply to PyPy2 as well.
* python-utils-r1.eclass: _python_impl_matches for impl-pattern matchingMichał Górny2017-05-161-0/+24
| | | | | | Introduce a _python_impl_matches() function that commonizes the pattern matching behavior used throughout python-r1 & python-single-r1. Having a single implementation makes future extensions much easier.
* python-utils-r1.eclass: python_moduleinto, allow package dot-notationMichał Górny2017-05-161-2/+4
| | | | | | | Allow specifying the relative package destination using the dot-notation used by Python itself (e.g. 'foo.bar') in addition to the directory form ('foo/bar'). Since dot can not be used in Python package names, this change is backwards-compatible.
* python-utils-r1.eclass: python_moduleinto, clarify relative path useMichał Górny2017-05-161-0/+6
| | | | | | | Clearly indicate that python_moduleinto can be safely called outside of the environment with Python interpreter established, and that a single call can set the correct relative path for multiple different implementations.
* python-utils-r1.eclass: Remove stray old doc bitMichał Górny2017-05-161-6/+0
| | | | | Remove the bit of old python_moduleinto documentation that has been accidentally left over.
* python-utils-r1.eclass: python_optimize, enable py3.5 logic for pypy3Michał Górny2017-04-301-1/+1
| | | | | Enable the three-level optimization logic for pypy3, to account for pypy3-5.7 being based on CPython 3.5 and using all three suffixes.
* python-utils-r1.eclass: python_wrapper_setup, do not query PYTHON_CONFIGMichał Górny2017-04-251-4/+2
| | | | | | | | | | | | | | | Use plain 'pythonX.Y-config' executable name in the python-config wrapper instead of querying the complete PYTHON_CONFIG path from python_export. Constructing full PYTHON_CONFIG path requires querying ABIFLAGS which requires the Python interpreter to be installed, which in turn unnecessarily forces every ebuild using the eclass to carry a build-time dependency on the Python interpreter. All current versions of Python correctly install 'pythonX.Y-config' symlink that points to the correct ABI-suffixed binary. It is therefore unnecessary to use the full path.
* Drop trailing whitespacesJustin Lecher2017-03-191-2/+2
| | | | Signed-off-by: Justin Lecher <jlec@gentoo.org>
* python-utils-r1.eclass: _python_set_impls, add integrity checkMichał Górny2017-03-081-3/+19
| | | | | | | Add integrity check for multi-inherits, i.e. ensure that PYTHON_COMPAT has not changed between successive calls to _python_set_impls. If it did (e.g. because of eclass+ebuild setting different values), then we abort not to give surprising results to the user.
* python-utils-r1.eclass: _python_set_impls, use local varsMichał Górny2017-03-081-5/+6
| | | | | | Refactor _python_set_impls to use local variables throughout the function and assign global values at the end. This prepares it for double-inherit integrity checks. NFC.
* python-utils-r1.eclass: python_wrapper_setup, fix exporting envMichał Górny2017-03-081-10/+10
| | | | | | | | Fix python_wrapper_setup function to move setting environment variables for PATH and PKG_CONFIG_PATH outside the 'if'. Otherwise, they are only set on the initial invocation of python_wrapper_setup for the particular impl and do not apply to subsequent invocations (e.g. further distutils-r1 phases).
* 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-utils-r1.eclass: Require pypy{,3} >= 5, #609292Michał Górny2017-02-171-2/+2
| | | | | Bump the dependency on PyPy to require relatively recent versions, to ease package maintenance.
* python-utils-r1.eclass: Enable python3_6 targetMichał Górny2017-01-251-3/+3
|
* python-utils-r1.eclass: drop support for python3_3Mike Gilbert2016-10-271-3/+3
|
* python-utils-r1.eclass: try C.UTF-8 and en_GB.UTF-8 in python_export_utf8_localeMike Gilbert2016-09-231-1/+1
|
* python-utils-r1.eclass: override LC_ALL in _python_check_locale_sanityMike Gilbert2016-09-231-1/+1
|
* python-utils-r1.eclass: Add additional .opt-1 compilation for py3.5+Michał Górny2016-06-061-0/+6
|
* python-utils-r1.eclass: python_wrapper_setup, fix pythonN-config cleanupMichał Górny2016-05-151-1/+1
|
* python-utils-r1.eclass: Make python_{script,module}root vars privateMichał Górny2016-05-141-36/+24
| | | | | | | Remove python_scriptroot & python_moduleroot from the public eclass API, in favor of calls to python_scriptinto and python_moduleinto. This feature was seldom used, not listed in the official API guide, and the *into functions is more in line with the PMS.
* python-utils-r1.eclass: stop respecting DESTTREE in python_do*/new*Michał Górny2016-05-141-3/+3
| | | | | | | | | | Replace the code respecting current value of ${DESTTREE} in favor of using /usr unconditionally. The feature was extremely unlikely to be ever used (only if you did 'into ...; python_do*', quite confusing and relied on semi-internal package manager variables. Furthermore, it was potentially broken as it relied on DESTTREE having an initial '/usr' value which is not warranted by the PMS.
* python-utils-r1.eclass: Do not prefer Jython & PyPy over CPythonMichał Górny2016-02-061-2/+2
| | | | | | | | | | | Fix _PYTHON_ALL_IMPLS to list Jython & PyPy before CPython versions, therefore causing them not to be implicitly preferred over CPython. The implementation reordering done in b284e54 ("reorder implementations in semi-ascending order") has caused PyPy & Jython to be listed after CPython. While seemingly it was more intuitive to list third-party implementations after the reference one, it also implicitly caused them to be preferred by python-exec.
* python*-r1.eclass: Commonize PYTHON_COMPAT processing, cache the resultMichał Górny2015-12-221-0/+49
| | | | | | | | | 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-utils-r1.eclass: Disable jython2_5Michał Górny2015-12-091-4/+2
|
* python-utils-r1.eclass: Reorder implementations to semi-ascending orderMichał Górny2015-12-091-3/+3
| | | | | | | | | | | | | | | | | | | | | | Reorder the Python implementations to ascending version order, with CPython listed first and other implementations in descending preference. The previous ordering has been used for two reasons: 1. There were packages which supported Python 3.x or PyPy partially but their documentation builds or test functions required CPython 2.x. The specific ordering caused python_export_best (the predecessor of python_setup) to use CPython 2.x for those tasks. This is now replaced by explicit implementation restrictions in python_setup. 2. PyPy setup runs were usually slower than CPython, and CPython 3.x runs were often slower due to 2to3 calls. Combined with parallel build runs, this ordering caused slower builds to start earlier and sometimes resulted in more efficient use of threads. However, nowadays we no longer do parallel builds. Therefore, it seems reasonable to finally reorder the implementations into a more intuitive order.
* python-utils-r1.eclass: Mark _PYTHON_ALL_IMPLS read-onlyMichał Górny2015-12-091-1/+1
|
* python-utils-r1.eclass: Change python_export_utf8_locale to deal with LC_ALL=CMike Gilbert2015-12-031-7/+15
| | | | | | Paludis sets LC_ALL=C to ensure a 'sane' build environment. We only want to override LC_CTYPE, so we break LC_ALL into separate LC_* overrides and set LC_ALL to blank.
* python-utils-r1.eclass: _python_check_locale_sanity, fix quoting issueMichał Górny2015-11-301-1/+1
|
* python-utils-r1.eclass: Reduce python_do*/new* ban to EAPI < 4Michał Górny2015-11-291-6/+6
| | | | | | Fix python_do* and python_new* helper ban to EAPIs older than 4. That was the original intent, and restricting it to 5+ breaks old dev-lang/python ebuilds.
* python-utils-r1.eclass: Enable EAPI 6Michał Górny2015-11-281-1/+1
|
* python-utils-r1.eclass: Make heredocs consistentMichał Górny2015-11-281-5/+5
|
* python-utils-r1.eclass: Support nonfatal in python_do* and python_new*Michał Górny2015-11-281-3/+3
|
* python-utils-r1.eclass: Remove unneeded multilib inherit in EAPI 6Michał Górny2015-11-281-2/+2
|
* python-utils-r1.eclass: Make python_fix_shebang QAwarns fatal in EAPI 6Michał Górny2015-11-281-4/+10
|
* python-utils-r1.eclass: Ban installation helpers in EAPIs < 5Michał Górny2015-11-281-0/+9
| | | | | | Ban python_do* and python_new* helpers in EAPIs older than 5. We should ban them in python-any-r1 uses, actually but that would break dev-python/pypy* ebuilds as they are written now.
* python-utils-r1.eclass: Replace local INSDESTTREE with subshellsMichał Górny2015-11-281-8/+8
| | | | | Replace the 'local INSDESTTREE' hacks (which are PMS-valid yet deprecated) with safer subshells.
* python-utils-r1.eclass: Remove py2.6 note from python_optimizeMichał Górny2015-11-281-3/+0
|